method

assert_generates

assert_generates(expected_path, options, defaults={}, extras = {}, message=nil)
public

Asserts that the provided options can be used to generate the provided path. This is the inverse of assert_recognizes. For example:

  assert_generates("/items", :controller => "items", :action => "index")
  assert_generates("/items/list", :controller => "items", :action => "list")
  assert_generates("/items/list/1", { :controller => "items", :action => "list", :id => "1" })