#441 √ resolved
Matt Albright

router spec incorrectly passes with an empty parameters expectation

Reported by Matt Albright | August 16th, 2008 @ 03:48 AM | in 0.9.5

I want to write a router spec that is:

request_to("/foo.1/version", :get).
  should route_to(Exceptions, :invalid_path).
  with({})
In other words, it should have no parameters. If there are parameters, the above test still passes.

Most easily shown with this spec, to be put in merb-core/spec/public/test/route_matchers_spec.rb :

it "should work with an empty expectation" do
  ParameterMatcher.new({}).matches?(:param => "abc").should be_false
end

Comments and changes to this ticket

  • Michael Klishin (antares)

    Michael Klishin (antares) August 20th, 2008 @ 12:13 PM

    • → Tag changed from “” to “merb-core spec”
    • → Milestone changed from “” to “0.9.5”
    • → State changed from “new” to “resolved”
    • → Assigned user changed from “” to “Michael Klishin (antares)”

    Fixed, thanks for reporting.

Please Login or create a free account to add a new comment.

You can update this ticket by sending an email to from your email client. (help)

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

People watching this ticket