Created
September 17, 2009 17:29
-
-
Save mrchrisadams/188605 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module EventsHelper | |
def filter_check_button_path | |
params[:filter].blank? ? '/images/buttons/bt_search_for_events.gif' : '/images/buttons/bt_refine_this_search.gif' | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') | |
describe EventsHelper do | |
#Delete this example and add some real ones or delete this file | |
it "should be included in the object returned by #helper" do | |
included_modules = (class << helper; self; end).send :included_modules | |
included_modules.should include(EventsHelper) | |
end | |
it "should return the 'refine image search' button if a search has been run" do | |
params = {} | |
params[:filter] = true | |
EventsHelper.filter_check_button_path.should be('/images/buttons/bt_search_for_events.gif') | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
should return the 'refine image search' button if a search has been run | |
undefined method `filter_check_button_path' for EventsHelper:Module |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment