Sha256: 697e8cfaf2951eb3527129c756ea8e2488908e539b65c7058e21eb3cc1f03d47
Contents?: true
Size: 581 Bytes
Versions: 2
Compression:
Stored size: 581 Bytes
Contents
require File.dirname(__FILE__) + '/../test_helper' class Crags::FetchTest < Test::Unit::TestCase context "Fetch" do setup do extend Crags::Fetch end should "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 should "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 end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
gotascii-crags-1.4.2 | test/crags/fetch_test.rb |
gotascii-crags-1.4.3 | test/crags/fetch_test.rb |