Open vdogamer opened 9 years ago
Hi, glad you liked the book! Try adding the following near the top of your rails_helper.rb file:
require 'capybara/rails'
Hello, Aaron.
I still get a “NoMethodError: undefined method for ‘sign_in’” error for the User Management feature spec.
Cameron.
From: Aaron Sumner [mailto:notifications@github.com] Sent: Monday, February 23, 2015 9:12 PM To: everydayrails/rails-4-1-rspec-3-0 Cc: Cameron Diggs Subject: Re: [rails-4-1-rspec-3-0] Problems with using Capybara (#51)
Hi, glad you liked the book! Try adding the following near the top of your rails_helper.rb file:
require 'capybara/rails'
— Reply to this email directly or view it on GitHubhttps://github.com/everydayrails/rails-4-1-rspec-3-0/issues/51#issuecomment-75685814.
I don't see the following in rails_helper.rb:
Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f}
RSpec.configure do |config|
# other RSpec configuration omitted ...
config.include LoginMacros
end
This is covered in chapter 7. RSpec needs to know where to load any support files.
Ah! Okay.
I did skip that chapter because I wanted to jump into Capybara. Thanks again for the quick response!!!
Cameron.
From: Aaron Sumner [mailto:notifications@github.com] Sent: Tuesday, February 24, 2015 9:20 PM To: everydayrails/rails-4-1-rspec-3-0 Cc: Cameron Diggs Subject: Re: [rails-4-1-rspec-3-0] Problems with using Capybara (#51)
I don't see the following in rails_helper.rb:
Dir[Rails.root.join("spec/support/*/.rb")].each {|f| require f}
RSpec.configure do |config|
config.include LoginMacros
end
This is covered in chapter 7. RSpec needs to know where to load any support files.
— Reply to this email directly or view it on GitHubhttps://github.com/everydayrails/rails-4-1-rspec-3-0/issues/51#issuecomment-75893360.
Hello.
First I want to say "Thank you!!!" for creating this book!!! I will recommend this book for the Thinkful.com training site. I'm having problems with the Capybara testing. Rspec doesn't like when I type 'visit root_path'. When I create the Module, it still doesn't like the login aspect.
my github is https://github.com/vdogamer/rpsec1
(forgive my misspelling)