add simple get test
parent
bd6160b445
commit
dc11231a4d
|
@ -3,11 +3,11 @@ require "webmock"
|
||||||
WebMock.stub(:any, "example.com")
|
WebMock.stub(:any, "example.com")
|
||||||
|
|
||||||
describe Mechanize do
|
describe Mechanize do
|
||||||
# TODO: Write tests
|
it "simple get" do
|
||||||
|
agent = Mechanize.new
|
||||||
it "works" do
|
uri = "http://example.com/"
|
||||||
response = HTTP::Client.get("http://example.com")
|
page = agent.get(uri)
|
||||||
response.body.should eq ""
|
page.code.should eq 200
|
||||||
response.status_code.should eq 200
|
page.uri.to_s.should eq uri
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue