The title is self explanatory.
Everything I\'ve tried led to a \"undefined method\".
To clarify, I am not trying to test a helper method. I am trying to use a he
As you can see here https://github.com/rspec/rspec-rails , you should initialize the spec/ directory (where specs will reside) with:
$ rails generate rspec:install
this will generate an rails_helper.rb with the option
config.infer_spec_type_from_file_location!
and finally require the new rails_helper in you helper_spec.rb instead of requiring 'spec_helper'.
require 'rails_helper'
describe ApplicationHelper do
...
end
good luck.