-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Closed
Description
I created a file named search_helper.rb inside the app/helpers folder.
It had a simple class inside, nothing fancy:
app/helpers/search_helper.rb:
class SearchHelper
#some_code
end
It was used in a model:
app/models/end_user.rb:
search_helper = SearchHelper.new
After this change, when I ran the test cases, all of them failed with the following error(s):
An error occurred while loading ./spec/models/venue_spec.rb.
Failure/Error: require 'rspec/rails'
NameError:
uninitialized constant ActionView::TestCase::Behavior
# ./spec/rails_helper.rb:7:in `<top (required)>'
# ./spec/models/venue_spec.rb:1:in `<top (required)>'
When I renamed SearchHelper to SearchManager, the test cases started working again. Looks like Rspec had a problem with the word Helper.
My Versions:
Rails 5.0.4
ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-darwin16]
Mac OS Sierra
rspec-rails 3.6.0
shivanshgaur, AnthonyBobsin and amahajan87
Metadata
Metadata
Assignees
Labels
No labels