lib/rspec/rails/example/request_example_group.rb in rspec-rails-2.0.0.beta.12 vs lib/rspec/rails/example/request_example_group.rb in rspec-rails-2.0.0.beta.13

- old
+ new

@@ -1,17 +1,32 @@ require 'action_dispatch' require 'webrat' module RSpec::Rails + # Extends ActionDispatch::Integration::Runner to work with RSpec. + # + # == Matchers + # + # In addition to the stock matchers from rspec-expectations, request + # specs add these matchers, which delegate to rails' assertions: + # + # response.should render_template(*args) + # => delegates to assert_template(*args) + # + # response.should redirect_to(destination) + # => delegates to assert_redirected_to(destination) 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 + include RSpec::Rails::Matchers::RedirectTo + include RSpec::Rails::Matchers::RenderTemplate + include ActionController::TemplateAssertions module InstanceMethods def app ::Rails.application end