spec/private/recognize_spec.rb in usher-0.5.5 vs spec/private/recognize_spec.rb in usher-0.5.6

- old
+ new

@@ -221,10 +221,17 @@ route_set.recognize(build_request({:method => 'get', :path => '/foo/bar'})).path.route.should == route route_set.recognize(build_request({:method => 'post', :path => '/foo/bar'})).should.nil? end + it "should not match partially when a route is not set as partially matched" do + route = route_set.add_route("/foo", :foo => :bar) + route_set.recognize(build_request(:path => "/foo")).path.route.should == route + route_set.recognize(build_request(:path => "/foo/bar")).should be_nil + end + + end describe "dup safety" do before do route_set.add_route("/foo", :foo => "foo") @@ -269,6 +276,6 @@ r4.recognize(build_request(:path => "/r3")).path.route.destination.should == r3 r1.recognize(build_request(:path => "/r3")).should be_nil end end -end \ No newline at end of file +end