Skip to content

Instantly share code, notes, and snippets.

@k2052
Created June 10, 2011 00:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save k2052/1018033 to your computer and use it in GitHub Desktop.
Save k2052/1018033 to your computer and use it in GitHub Desktop.
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