module RSpec::Rails::Matchers::RoutingMatchers

def be_routable

{:put => "/yet/another/path"}.should_not be_routable
{:post => "/another/path"}.should be_routable
{:get => "/a/path"}.should be_routable
You can use route helpers provided by rspec-rails.

@example

`RouteSet#recognize_path`.
the declarations in `config/routes.rb`. Delegates to
Passes if the route expression is recognized by the Rails router based on
def be_routable
  BeRoutableMatcher.new(self)
end

def route_to(*expected)

Other tags:
    See: http://api.rubyonrails.org/classes/ActionDispatch/Assertions/RoutingAssertions.html#method-i-assert_recognizes -
def route_to(*expected)
  RouteToMatcher.new(self, *expected)
end