Sha256: d795a16bdb0b497c0fc47d1e846c08495879c046de61bc8818080257f51ed883
Contents?: true
Size: 479 Bytes
Versions: 9
Compression:
Stored size: 479 Bytes
Contents
require '../test_helper' context "Fetch" do setup do extend Crags::Fetch end specify "fetch doc should hpricot fetched html" do stubs(:fetch_html).with("url").returns("html") Hpricot.expects(:parse).with("html").returns("doc") fetch_doc("url").should == "doc" end specify "fetch html should curl a url" do curb = stub(:body_str => "uhh") Curl::Easy.expects(:perform).with("url").returns(curb) fetch_html("url").should == "uhh" end end
Version data entries
9 entries across 9 versions & 1 rubygems