updating part2, far from finished

This commit is contained in:
2013-12-20 19:22:12 +01:00
parent 748944865d
commit b4c4a15e60
22 changed files with 2779 additions and 62 deletions
+2 -1
View File
@@ -1,7 +1,7 @@
module SpecRouteHelpers
# allows tests like:
# route_should_be 'agama_groups#index'
def route_should_be(route_def)
def route_should_be(route_def, options = {})
route_hash = case route_def
when String
controller_name, action_name = route_def.split('#')
@@ -10,6 +10,7 @@ module SpecRouteHelpers
else
route_def
end
route_hash.merge! options
Rails.application.routes.recognize_path(page.current_path).should include route_hash
end
end