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 method `alias_method_chain' for RSpec::Matchers::BuiltIn::Have:Class (NoMethodError) #1026
Comments
Hi @HolyWalley, This doesn't appear to be a shoulda-matchers issue, but I'll give you an answer anyway. It looks like you're attempting to use Capybara in a request spec. Typically request specs are used to hit API endpoints that you may have created in your app. They are very similar to controller specs. If you want to use Capybara, I would suggest using a feature spec instead. This is as simple as moving your file from Additionally, it also looks like you're using rspec-rails 2.x. This is an old version of the gem which is no longer maintained. It looks like the latest version is 3.6.0, so I would try upgrading and see if that helps. Please note that you will have to Post back if you continue to have problems. |
Thank you so much. I did everything you advised and I succeeded. How can i thank you? |
@HolyWalley Don't worry about it! I'm just happy that I was able to help you :) |
I have same problem!I folloowing instructions in your README but don't fix this error
My Gemfile look like this:
And rails_helper look like this:
what should i do??? |
@Alexxeey I'm not exactly sure why you're getting that error, but try using RSpec 3 and shoulda-matchers 3. |
Thank you @mcmire i already fix this bug. |
@Alexxeey Great, glad I could help! |
Hi, i'm a beginner in ruby and rails and i study rails with rails tutorial. I have a problem with shoulda-matchers i think. i tried to find answer, but i can't.
when i use:
bundle exec rspec spec/requests/static_pages_spec.rb
i get this error:
my Gemfile looks:
static_pages_spec.rb:
if i remove
require 'spec_helper'
i get this:sorry if i wrote something bad
The text was updated successfully, but these errors were encountered: