Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined local variable or method `set_the_flash' #385

Closed
theo-bittencourt opened this issue Aug 7, 2013 · 2 comments
Closed

undefined local variable or method `set_the_flash' #385

theo-bittencourt opened this issue Aug 7, 2013 · 2 comments

Comments

@theo-bittencourt
Copy link

I'm getting

undefined local variable or method  `set_the_flash'

when running tests with Zeus only.
rspec spec runs fine.

set_the_flash is an instance method of shoulda-matchers gem:

Shoulda::Matchers::ActionController#set_the_flash

@sideshowcoder
Copy link
Collaborator

Might the same problem as #134 make sure the gems are in the same group

group :test do
  gem 'rspec-rails'
  gem 'shoulda-matchers'
end

also make sure to not require autorun

Hope this helps, shoulda has been the source of some issues so far.

@theo-bittencourt
Copy link
Author

Works fine now! Thanks!

I just had to reorder the Gemfile groups to keep rspec-rails generators.

Before:

group :test do
  gem 'shoulda-matchers'
end

group :development, :test do
  gem 'rspec-rails'
end

After:

group :development, :test do
  gem 'rspec-rails'
end

group :test do
  gem 'shoulda-matchers'
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants