To add a collaborator to this project you will need to use the Relish gem to add the collaborator via a terminal command. Soon you'll be able to also add collaborators here!
More about adding a collaboratoruse of capybara in controller specs
In RSpec 2.x, capybara's DSL was automatically available in controller
specs. In RSpec 3.x, capybara is no longer available in controller specs
automatically.
To continue using capybara's DSL in controller specs, include
Capybara::DSL
explicitly.
- Scenarios
-
- Capybara::DSL methods are available, but raise deprecation warnings
-
- Given
-
a file named "spec/controllers/widgets_controller_spec.rb" with:
require "spec_helper" describe WidgetsController do describe "GET index" do it "says 'Listing widgets'" do expect(RSpec).to receive(:deprecate) visit "/widgets" end end end
- When
-
I run
rspec spec
- Then
- the examples should all pass
- include Capybara::DSL methods explicitly
-
- Given
-
a file named "spec/controllers/widgets_controller_spec.rb" with:
require "spec_helper" describe WidgetsController do include Capybara::DSL describe "GET index" do it "says 'Listing widgets'" do expect(RSpec).not_to receive(:deprecate) visit "/widgets" end end end
- When
-
I run
rspec spec
- Then
- the examples should all pass
Last published over 7 years ago by myronmarston.