Add missing tests for the functionality at the beginning of the route() method

Signed-off-by: Konstantin Haase <konstantin.mailinglists@googlemail.com>
This commit is contained in:
Aviv Ben-Yosef 2011-03-05 18:25:37 +02:00 committed by Konstantin Haase
parent 7e0a84279a
commit b176d3738f
1 changed files with 11 additions and 0 deletions

View File

@ -949,4 +949,15 @@ class RoutingTest < Test::Unit::TestCase
assert ok?
assert_equal 'bar in baseclass', body
end
it "adds hostname condition when it is in options" do
mock_app {
get '/foo', :host => 'host' do
'foo'
end
}
get '/foo'
assert not_found?
end
end