class RouteMechanic::RSpec::Matchers::HaveNoUnusedRoutes

Public Instance Methods

description() click to toggle source
# File lib/route_mechanic/rspec/matchers/have_no_unused_routes.rb, line 15
def description
  "have no unused routes"
end
matches?(_actual) click to toggle source
# File lib/route_mechanic/rspec/matchers/have_no_unused_routes.rb, line 7
def matches?(_actual)
  # assert_recognizes does not consider ActionController::RoutingError an
  # assertion failure, so we have to capture that and Assertion here.
  match_unless_raises Minitest::Assertion, ActiveSupport::TestCase::Assertion, ActionController::RoutingError do
    assert_no_unused_routes(@expected)
  end
end