Skip to content

Instantly share code, notes, and snippets.

@cherring
Forked from juliocesar/gist:895499
Created March 30, 2011 23:32
Show Gist options
  • Save cherring/895523 to your computer and use it in GitHub Desktop.
Save cherring/895523 to your computer and use it in GitHub Desktop.
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