So I\'m new to TDD & I\'m throwing some Rspec errors here on my tests...Basically after running bundle exec rspec spec, I get an undefined method \'visit\'
The problem is here:
./spec/requests/user_pages_spec.rb
You put the Capybara integration tests in requests folder. That's why the method visit won't work.
To fix, just move all the tests from spec/requests to spec/features.
This happens because you are trying to use the visit method from Capybara::DSL.
If you check the documentation:
Capybara is no longer supported in request specs as of Capybara 2.0.0. The recommended way to use Capybara is with feature specs.
To solve this problem you should move your tests to spec/features folder or include Capybara::DSL for the request specs:
#spec_helper.rb
RSpec.configure do |config|
#...
config.include Capybara::DSL, :type => :request