Skip to content

Commit

Permalink
Take advantage of Mocha support for sequenced returns. Closes #8639 […
Browse files Browse the repository at this point in the history
…Josh Peek]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7010 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information
jeremy committed Jun 13, 2007
1 parent c5f0058 commit c0c0018
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions actionpack/test/controller/integration_test.rb
Expand Up @@ -54,8 +54,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, true, false)
@session.expects(:follow_redirect!).times(2)

@session.stubs(:status).returns(200)
Expand All @@ -67,8 +66,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, true, false)
@session.expects(:follow_redirect!).times(2)

@session.stubs(:status).returns(200)
Expand Down

0 comments on commit c0c0018

Please sign in to comment.