spec/api-client/base/post_spec.rb in api-client-1.1.0 vs spec/api-client/base/post_spec.rb in api-client-1.1.1

- old
+ new

@@ -78,11 +78,22 @@ before :each do FakeWeb.register_uri(:post, "http://api.example.com/user/5", :status => "201", :body => '{"a": "a", "b": "b"}') User.stub(:new).and_return(user) end - it "should return a object intialized with the response" do + it "should return a object initialized with the response" do User.post('http://api.example.com/user/5', {}).should == user + end + end + + context "with a specified port" do + before :each do + FakeWeb.register_uri(:post, "http://api.example.com:3001/user/5", :status => "201", :body => '{"a": "a", "b": "b"}') + User.stub(:new).and_return(user) + end + + it "should return a object initialized with the response" do + User.post('http://api.example.com:3001/user/5', {}).should == user end end end end \ No newline at end of file