Getting "uninitialized constant Rails (NameError)" error after using workaround
jasnow opened this issue · 2 comments
jasnow commented
Why do I get this error message uninitialized constant Rails (NameError) after adding this line to Gemfile file:
gem 'rails-controller-testing'
and these 5 lines to spec/spec_helper.rb file (based on rails-controller-testing gem README)?
RSpec.configure do |config|
config.include Rails::Controller::Testing::TestProcess
config.include Rails::Controller::Testing::TemplateAssertions
config.include Rails::Controller::Testing::Integration
end
Thanks.
tgxworld commented
Is your spec_helper
being loaded before Rails is loaded?
jasnow commented
Fixed