spec/weary/request_spec.rb in weary-0.5.1 vs spec/weary/request_spec.rb in weary-0.6.0

- old
+ new

@@ -15,18 +15,20 @@ it "should craft a Net/HTTP Request" do test = Weary::Request.new("http://google.com").send :http test.class.should == Net::HTTP end + # replace with FakeWeb it "should perform the request and retrieve a response" do test = Weary::Request.new("http://foo.bar") method = test.method response = Weary::Response.new(mock_response(method, 301, {'Location' => 'http://bar.foo'}), method) test.stub!(:perform).and_return(response) test.perform.code.should == 301 test.perform.redirected?.should == true end + # replace with FakeWeb it "should follow redirects" do test = Weary::Request.new("http://foo.bar") method = test.method response = Weary::Response.new(mock_response(method, 301, {'Location' => 'http://bar.foo'}), method) response.stub!(:follow_redirect).and_return Weary::Response.new(mock_response(method, 200, {}), method) \ No newline at end of file