-
-
Save cherring/895523 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'steak' | |
require 'capybara' | |
require 'capybara/dsl' | |
require 'rack/test' | |
RSpec.configure do |config| | |
def app | |
Capybara.app | |
end | |
config.include Capybara | |
config.include Rack::Test::Methods | |
end | |
# Then you'll be able to use get, post, delete, put. | |
# Bear in mind, responses coming from those methods are accessible via | |
# a method `last_response_body`. That's how rack/test works. For completeness | |
# sake, you could write a hook to put the response into a Capybara response object. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment