Permalink
Browse files

Add a test for assert_recognizes on ActionDispatch::IntegrationTest [#…

…4390 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
  • Loading branch information...
1 parent 5c9d23f commit ed0ca5db9ea247ceae67f22a750cbd49006f35ed @spastorino spastorino committed with jeremy Apr 24, 2010
Showing with 13 additions and 1 deletion.
  1. +7 −1 actionpack/test/abstract_unit.rb
  2. +6 −0 actionpack/test/dispatch/routing_test.rb
@@ -143,6 +143,12 @@ def config
end
end
+class ActionDispatch::IntegrationTest < ActiveSupport::TestCase
+ setup do
+ @routes = SharedTestRoutes
+ end
+end
+
class ActionController::IntegrationTest < ActiveSupport::TestCase
def self.build_app(routes = nil)
RoutedRackApp.new(routes || ActionDispatch::Routing::RouteSet.new) do |middleware|
@@ -275,4 +281,4 @@ module ActionController
class Base
include SharedTestRoutes.url_helpers
end
-end
+end
@@ -1000,6 +1000,12 @@ def test_url_generator_for_generic_route
end
end
+ def test_assert_recognizes_account_overview
+ with_test_routes do
+ assert_recognizes({:controller => "account", :action => "overview"}, "/account/overview")
+ end
+ end
+
private
def with_test_routes
yield

0 comments on commit ed0ca5d

Please sign in to comment.