spec/unit/sucker/request_spec.rb in sucker-0.6.2 vs spec/unit/sucker/request_spec.rb in sucker-0.6.3

- old
+ new

@@ -74,9 +74,21 @@ it "converts a parameter whose value is an array to a string" do @worker.parameters["Foo"] = ["bar", "baz"] query = @worker.send(:build_query) query.should match /Foo=bar%2Cbaz/ end + + it "handles integer parameter values" do + @worker.parameters["Foo"] = 1 + query = @worker.send(:build_query) + query.should match /Foo=1/ + end + + it "handles floating-point parameter values" do + @worker.parameters["Foo"] = 1.0 + query = @worker.send(:build_query) + query.should match /Foo=1/ + end end context "#host" do it "returns a host" do @worker.locale = "fr"