1
0
Fork 0
mirror of https://github.com/sinatra/sinatra synced 2023-03-27 23:18:01 -04:00

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.
This commit is contained in:
Matt Wildig 2012-05-29 20:50:05 +01:00
parent 1c36d54778
commit 1950d202c6

View file

@ -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