spec/matchers_spec.rb in roda-2.28.0 vs spec/matchers_spec.rb in roda-2.29.0

- old
+ new

@@ -156,11 +156,11 @@ status("/123/").must_equal 404 end end describe "matchers" do - it "should handle string with embedded param" do + deprecated "should handle string with embedded param" do app do |r| r.on "posts/:id" do |id| id end @@ -183,20 +183,21 @@ r.on "responses-:id" do '2' end end + # RODA3: remove option app.opts[:verbatim_string_matcher] = true status('/post/123').must_equal 404 status('/posts/123').must_equal 404 body('/posts/:id').must_equal '1' status('/responses-123').must_equal 404 body('/responses-:id').must_equal '2' end - it "should handle multiple params in single string" do + deprecated "should handle multiple params in single string" do app do |r| r.on "u/:uid/posts/:id" do |uid, id| uid + id end end @@ -204,11 +205,11 @@ body("/u/jdoe/posts/123").must_equal 'jdoe123' status("/u/jdoe/pots/123").must_equal 404 end - it "should escape regexp metacharaters in string" do + deprecated "should escape regexp metacharaters in string" do app do |r| r.on "u/:uid/posts?/:id" do |uid, id| uid + id end end @@ -216,11 +217,11 @@ body("/u/jdoe/posts?/123").must_equal 'jdoe123' status("/u/jdoe/post/123").must_equal 404 end - it "should handle colons by themselves" do + deprecated "should handle colons by themselves" do app do |r| r.on "u/:/:uid/posts/::id" do |uid, id| uid + id end end @@ -392,10 +393,10 @@ end status.must_equal 404 end - it "executes on arbitrary object" do + deprecated "executes on arbitrary object" do app do |r| r.on Object.new do "+1" end end