@@ -830,9 +830,11 @@ def three
830830 last_response . body . should == '["a","b,c"]'
831831 end
832832 it "should set route_params" do
833- subject . routes . size . should == 1
834- subject . routes [ 0 ] . route_params . should == { "string" => "" , "token" => "a token" }
835- subject . routes [ 0 ] . route_optional_params . should == { "limit" => "the limit" }
833+ subject . routes . map { |route |
834+ { :params => route . route_params , :optional_params => route . route_optional_params }
835+ } . should eq [
836+ { :params => { "string" => "" , "token" => "a token" } , :optional_params => { "limit" => "the limit" } }
837+ ]
836838 end
837839 end
838840 end
@@ -911,17 +913,17 @@ def three
911913 { :description => "Reverses a string." , :params => { "s" => { :desc => "string to reverse" , :type => "string" } } }
912914 ]
913915 end
914- it "should symbolize params" do
916+ it "should not symbolize params" do
915917 subject . desc "Reverses a string." , { :params =>
916- { :s => { :desc => "string to reverse" , :type => "string" } }
918+ { "s" => { :desc => "string to reverse" , :type => "string" } }
917919 }
918920 subject . get "reverse/:s" do
919921 params [ :s ] . reverse
920922 end
921923 subject . routes . map { |route |
922924 { :description => route . route_description , :params => route . route_params }
923925 } . should eq [
924- { :description => "Reverses a string." , :params => { :s => { :desc => "string to reverse" , :type => "string" } } }
926+ { :description => "Reverses a string." , :params => { "s" => { :desc => "string to reverse" , :type => "string" } } }
925927 ]
926928 end
927929 end
0 commit comments