Class: Brut::SpecSupport::Matchers::BeRoutingFor

Inherits:
Object
  • Object
show all
Defined in:
lib/brut/spec_support/matchers/be_routing_for.rb

Overview

Matcher used for handlers (or any code that returns a URI) to assert that the URI is for a given page with the given set of parameters

Examples:

result = handler.handle
expect(result).to be_routing_for(HomePage)

with parameters

result = handler.handle
expect(result).to be_routing_for(WidgetsByWidgetIdPage, id: widget.external_id)

with anchor

result = handler.handle
expect(result).to be_routing_for(MessagesPage, anchor: "latest_message")