Sha256: d642ddce11a8767d86df1726873afbd196cc8c9d95514b9e85c5c477fa24f21f
Contents?: true
Size: 705 Bytes
Versions: 2
Compression:
Stored size: 705 Bytes
Contents
require "spec_helper" describe Copy::Request::Info do describe "#url" do it "constructs the url" do info = Copy::Request::Info.new(:get, nil, "random", {id: 1} ) info.url.should =~ /random/ end end describe "#path_with_params" do it "does nothing when no params" do info = Copy::Request::Info.new(:get, nil, "random", nil) path = "/path/to/someplace" info.path_with_params(path, {}).should eq path end it "constructs the path with params" do info = Copy::Request::Info.new(:get, nil, "random", nil) path = "/path/to/someplace" info.path_with_params(path, {random: "stuff"}).should eq "#{path}?random=stuff" end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
copy-ruby-0.0.2 | spec/copy/request/info_spec.rb |
copy-ruby-0.0.1 | spec/copy/request/info_spec.rb |