Regarding to rspec issues (https://github.com/rspec/rspec-rails/issues/360)
you should put
config.include Capybara::DSL
in spec_helper.rb, inside the config block.
More Related Contents:
- Why isn’t my CORS configuration causing the server to filter incoming requests? How can I make the server only accept requests from a specific origin?
- Reducing n+1 queries using the Bullet and RSpec gems
- How can I test the page title with Capybara 2.0?
- Rails: Missing host to link to! Please provide :host parameter or set default_url_options[:host]
- How do I change the default “www.example.com” domain for testing in rails?
- How to spec a private method
- undefined method `get’ for #
- Suppress Ruby warnings when running specs
- Rails rspec set subdomain
- How to check for a JSON response using RSpec?
- How to check a checkbox in capybara?
- How is spec/rails_helper.rb different from spec/spec_helper.rb? Do I need it?
- undefined method `visit’ when using RSpec and Capybara in rails
- Controller spec unknown keyword: id
- Set Rspec default GET request format to JSON
- Why not use shared ActiveRecord connections for Rspec + Selenium?
- How to set request headers in rspec request spec?
- Why is Rspec saying “Failure/Error: Unable to find matching line from backtrace”?
- Rspec and capybara, difference between visit and get methods, with regards to the current_path object
- Why does adding “sleep 1” in an after hook cause this Rspec/Capybara test to pass?
- Configuring Warden for use in RSpec controller specs
- Incompatible library version: nokogiri.bundle requires version 11.0.0 or later, but libxml2.2.dylib
- Rails model without database
- How to get Ruby / Homebrew / RVM to work on Yosemite?
- How to URL encode a string in Ruby
- Rails 4 – Gem::LoadError: Specified ‘mysql2’ for database adapter, but the gem is not loaded
- Rails: FATAL – Peer authentication failed for user (PG::Error)
- Passing variables inside rails internationalization yml file
- Rails best way to get previous and next active record object
- Rails attachments inline are not shown correctly in gmail