spec/plugin/symbol_matchers_spec.rb in roda-1.0.0 vs spec/plugin/symbol_matchers_spec.rb in roda-1.1.0
- old
+ new
@@ -21,16 +21,20 @@
r.is "format:format" do |f|
"format#{f.inspect}"
end
+ r.is "thing/:thing" do |d|
+ "thing#{d}"
+ end
+
r.is :f do |f|
"f#{f}"
end
- r.is 'q:rest' do |r|
- "rest#{r}"
+ r.is 'q:rest' do |rest|
+ "rest#{rest}"
end
r.is :w do |w|
"w#{w}"
end
@@ -62,7 +66,8 @@
body("/1/1a/f").should == 'dwf11af'
body("/12/1azy/fffff").should == 'dwf121azyfffff'
status("/1/f/a").should == 404
body("/qa/b/c/d//f/g").should == 'resta/b/c/d//f/g'
body('/q').should == 'rest'
+ body('/thing/q').should == 'thingq'
end
end