diff --git a/shard.yml b/shard.yml index 6148732..1078ef5 100644 --- a/shard.yml +++ b/shard.yml @@ -11,3 +11,8 @@ license: MIT dependencies: myhtml: github: kostya/myhtml + +development_dependencies: + webmock: + github: manastech/webmock.cr + branch: master diff --git a/spec/mechanize_spec.cr b/spec/mechanize_spec.cr index 720f250..de1a32c 100644 --- a/spec/mechanize_spec.cr +++ b/spec/mechanize_spec.cr @@ -1,9 +1,13 @@ require "./spec_helper" +require "webmock" +WebMock.stub(:any, "example.com") describe Mechanize do # TODO: Write tests it "works" do - false.should eq(true) + response = HTTP::Client.get("http://example.com") + response.body.should eq "" + response.status_code.should eq 200 end end