aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch
diff options
context:
space:
mode:
authorValentine Valyaeff <val@magazon.com.ua>2015-05-19 01:21:20 +0300
committerValentine Valyaeff <val@magazon.com.ua>2015-05-19 01:21:20 +0300
commitbad30ed46c64593f83ecccf10604c73667e12e2b (patch)
tree8278835a59fd9b5021c8647516f1885770c42af6 /actionpack/test/dispatch
parente3333697fcdd23292a4ec15c80f17abef0156fc8 (diff)
downloadrails-bad30ed46c64593f83ecccf10604c73667e12e2b.tar.gz
rails-bad30ed46c64593f83ecccf10604c73667e12e2b.tar.bz2
rails-bad30ed46c64593f83ecccf10604c73667e12e2b.zip
ActionDispatch::Journey::Routes#empty? test cases
Diffstat (limited to 'actionpack/test/dispatch')
-rw-r--r--actionpack/test/dispatch/routing/route_set_test.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/routing/route_set_test.rb b/actionpack/test/dispatch/routing/route_set_test.rb
index fe52c50336..0c770a4406 100644
--- a/actionpack/test/dispatch/routing/route_set_test.rb
+++ b/actionpack/test/dispatch/routing/route_set_test.rb
@@ -17,6 +17,16 @@ module ActionDispatch
@set = RouteSet.new
end
+ test "not being empty when route is added" do
+ assert empty?
+
+ draw do
+ get 'foo', to: SimpleApp.new('foo#index')
+ end
+
+ refute empty?
+ end
+
test "url helpers are added when route is added" do
draw do
get 'foo', to: SimpleApp.new('foo#index')
@@ -136,6 +146,10 @@ module ActionDispatch
def url_helpers
@set.url_helpers
end
+
+ def empty?
+ @set.empty?
+ end
end
end
end