updating part2, far from finished
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user