Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Silence mocha warnings

git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/1-2-stable@7703 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
commit fe1ee81d1a2bef19680250a692465eed55d6f837 1 parent 8943da4
@NZKoz NZKoz authored
Showing with 2 additions and 4 deletions.
  1. +2 −4 actionpack/test/controller/integration_test.rb
View
6 actionpack/test/controller/integration_test.rb
@@ -56,8 +56,7 @@ def test_get_via_redirect
@session.expects(:get).with(path,args)
- redirects = [true, true, false]
- @session.stubs(:redirect?).returns(lambda { redirects.shift })
+ @session.stubs(:redirect?).returns(true).then.returns(true).then.returns(false)
@session.expects(:follow_redirect!).times(2)
@session.stubs(:status).returns(200)
@@ -69,8 +68,7 @@ def test_post_via_redirect
@session.expects(:post).with(path,args)
- redirects = [true, true, false]
- @session.stubs(:redirect?).returns(lambda { redirects.shift })
+ @session.stubs(:redirect?).returns(true).then.returns(true).then.returns(false)
@session.expects(:follow_redirect!).times(2)
@session.stubs(:status).returns(200)
Please sign in to comment.
Something went wrong with that request. Please try again.