Sha256: 41f578e89f22bcaa27d12063aa8fd598da7b3e33b3ea342f00f27cabb2422a1c
Contents?: true
Size: 687 Bytes
Versions: 1
Compression:
Stored size: 687 Bytes
Contents
require 'spec_helper' describe Scrapers::Xkcd do it {should respond_to :scrape} context "scraping" do before(:all) do @comic = VCR.use_cassette("xkcd") do Scrapers::Xkcd.scrape 149 end @expected = {:title => "Sandwich", :url => "http://xkcd.com/149/", :img_src => "http://imgs.xkcd.com/comics/sandwich.png", :hover_text => "Proper User Policy apparently means Simon Says." } end it "should retrieve the comic" do @comic.should_not be_nil end it "should be a Hash" do @comic.should be_a(Hash) end it "should return expected" do @comic.should eq @expected end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
scrapers-0.4.0 | spec/scrapers/xkcd_spec.rb |