Aug
22nd
Fri
22nd
How to mock Rails view helpers with RSpec
If you want to stub view helper method in some view spec, you can do the following:
@controller.template.stub!(:helper_method_name).with(:some_args).and_return("some result")