Created
June 10, 2011 00:08
-
-
Save k2052/1018033 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
should "be able to filter based on a symbol or path in a controller" do | |
mock_app do | |
controllers :foo do | |
before(:index, '/foo/main') { @test = 'before'} | |
get :index do | |
@test | |
end | |
get :main do | |
@test | |
end | |
end | |
end | |
get '/foo' | |
assert_equal 'before', body | |
get '/foo/main' | |
assert_equal 'before', body | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment