Skip to content

Commit

Permalink
Updated specs making real requests to www.example.com to expect updat…
Browse files Browse the repository at this point in the history
…ed content length.
  • Loading branch information
Bartosz Blimke and Ben Pickles committed Aug 3, 2010
1 parent 0f698b3 commit 73c6f01
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions spec/webmock_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
SAMPLE_HEADERS = { "Content-Length" => "8888", "Accept" => "application/json" }
ESCAPED_PARAMS = "x=ab%2Bc&z=%27Stop%21%27%20said%20Fred"
NOT_ESCAPED_PARAMS = "z='Stop!' said Fred&x=ab c"
WWW_EXAMPLE_COM_CONTENT_LENGTH = 596
end

class MyException < StandardError; end;
Expand Down Expand Up @@ -1447,11 +1448,11 @@ def call(request)
end

it "should pass response with headers" do
@response.headers["Content-Length"].should == "574"
@response.headers["Content-Length"].should == "#{WWW_EXAMPLE_COM_CONTENT_LENGTH}"
end

it "should pass response with body" do
@response.body.size.should == 574
@response.body.size.should == WWW_EXAMPLE_COM_CONTENT_LENGTH
end

end
Expand Down

0 comments on commit 73c6f01

Please sign in to comment.