Sha256: 66fa0f61643502d16278f39dc0b2d457d94a97c37d6be6da4492fde79835d541
Contents?: true
Size: 628 Bytes
Versions: 18
Compression:
Stored size: 628 Bytes
Contents
require "spec_helper" require "action_controller/test_case" describe "redirect_to" do include RSpec::Rails::Matchers::RedirectTo it "delegates to assert_redirected_to" do self.should_receive(:assert_redirected_to).with("destination") "response".should redirect_to("destination") end it "uses failure message from assert_redirected_to" do self.stub!(:assert_redirected_to).and_raise( Test::Unit::AssertionFailedError.new("this message")) response = ActionController::TestResponse.new expect do response.should redirect_to("destination") end.to raise_error("this message") end end
Version data entries
18 entries across 18 versions & 1 rubygems