-
Notifications
You must be signed in to change notification settings - Fork 231
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
The gem shoulda-matchers does not work #134
Comments
Do you have |
No, but I am not using paperclip though. I am using (https://github.com/thoughtbot/shoulda-matchers). Don't use it for any models, only use it for my controllers at this moment. And again, works without |
I will close this issue, Setup that was failing: group :test do
gem 'shoulda-matchers'
end
group :development, :test do
gem 'rspec-rails'
end Setup that is working: group :test do
gem 'rspec-rails'
gem 'shoulda-matchers'
end |
Wow, I read through that way too fast. Sorry for the useless question. |
Thanks @terlar, I had the same issue, moved |
unfortunately it didn't work for me. very odd, since I have a different project, same order but other versions for shoulda an rspec-rails, and there it works. |
unfortunately it didn't work for me too. |
@lcx and @squiter85 - can you share your full Gemfile in a gist please |
Here it goes @andyw8 https://gist.github.com/squiter85/5416077 :) hmm I'm use 'shoulda', not 'shoulda-matcher', but I think the error is the same, my specs that don't use it runs fine. |
@squiter85 Did you try to move them to the same group as that seemed to be the problem for me. |
https://gist.github.com/lcx/5419536 Funny thing is, I have a similar Gemfile in a different project where I have no problems. |
@terlar I was tried to change order of gems, but not tried put all in the same group, and when I made it all works fine! Thank you guys! 👍 |
@squiter85 could you please share your new gemfile? Didn't work for me so I'm curious where the difference is. |
Here @lcx https://gist.github.com/squiter85/5420557 I'm justo move 'gem "shoulda"' to the same group of 'rspec-rails' ;) |
nope, no matter how I change it, won't work for me. Any other hints except to remove shoulda? |
I just found this solution to be working: Remove require 'rspec/autotest' from spec_helper.rb |
that worked for me too! thank you so much,was wasting so much time finding out the issue. |
yeah. make sure remove/comment out # require 'rspec/autorun'. it helps <3 |
+50! Spent like all morning and part of the afternoon. Please someone put this on the README ASAP! |
How to not require it only when run via zeus? |
I just removed require 'rspec/autorun' and everything worked both with RSpec with/without Zeus. |
also: see thoughtbot/shoulda-matchers#384, this rebroke when I moved from shoulda-matchers 2.5 -> 2.6 |
also: ensure gem 'shoulda-matchers', require: false and then require 'shoulda/matchers' in |
Someone with this issue when running tests usign guard ? |
Moving |
+1 to @michaelglass solution |
Another +1 to the @michaelglass solution, thank you! |
it started working for me when adding the following to rails_helper:
which was in the readme file |
When running specs with
zeus rspec
all tests using shoulda-matchers fail.I get the error message with undefined method which is the same as if
shoulda-matchers
weren't loaded.Do I need to configure something special to get this to work with
zeus
? Works perfectly fine with barerspec
.The only thing I have right now specific to the shoulda-matchers is the following code in my
Gemfile
and my specs of course.The text was updated successfully, but these errors were encountered: