Skip to content

Commit

Permalink
Resolve test name conflict
Browse files Browse the repository at this point in the history
In AfterFilterTest in filter_test.rb there are two tests named
"executes filters in the order defined", causing the first not to be
run.

Rename the first test, and fix the mock app in the test so it doesn't
cause a Rack::Lint error.
  • Loading branch information
mattwildig committed May 29, 2012
1 parent 1c36d54 commit 1950d20
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/filter_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -156,11 +156,11 @@ class BeforeFilterTest < Test::Unit::TestCase
end

class AfterFilterTest < Test::Unit::TestCase
it "executes filters in the order defined" do
it "executes before and after filters in correct order" do
invoked = 0
mock_app do
before { invoked = 2 }
get('/') { invoked += 2 }
get('/') { invoked += 2; 'hello' }
after { invoked *= 2 }
end

Expand Down

0 comments on commit 1950d20

Please sign in to comment.