Permalink
Browse files

Resolve test name conflict

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...
1 parent 1c36d54 commit 1950d202c6988297b47a0ade82d0cdaf7152ce1e @mattwildig mattwildig committed May 29, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 test/filter_test.rb
View
4 test/filter_test.rb
@@ -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

0 comments on commit 1950d20

Please sign in to comment.