Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: f6ebf66e71
Fetching contributors…

Cannot retrieve contributors at this time

40 lines (32 sloc) 0.786 kB
require 'action_dispatch'
require 'webrat'
module RSpec::Rails
module RequestExampleGroup
extend ActiveSupport::Concern
include ActionDispatch::Integration::Runner
include RSpec::Rails::TestUnitAssertionAdapter
include ActionDispatch::Assertions
include Webrat::Matchers
include Webrat::Methods
include RSpec::Matchers
module InstanceMethods
def app
::Rails.application
end
def last_response
response
end
end
included do
before do
@router = ::Rails.application.routes
end
Webrat.configure do |config|
config.mode = :rack
end
end
RSpec.configure do |c|
c.include self, :example_group => { :file_path => /\bspec\/requests\// }
end
end
end
Jump to Line
Something went wrong with that request. Please try again.