What am I doing wrong with this rspec helper test?
问题 All I'm trying to do is spec how a one line helper method for a view should behave, but I'm not sure what kind of mock object, (if any) I should be creating if I'm working in Rails. Here's the code for events_helper.rb: 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 And here's my spec code, in events_helper_spec.rb: require File.expand_path(File.dirname(__FILE__) + '/..