Sha256: d993452aa5af370f88f0823cd6b575c54070c105e7a044d60d26b88e7c6f3619

Contents?: true

Size: 648 Bytes

Versions: 3

Compression:

Stored size: 648 Bytes

Contents

require 'spec_helper'
require 'scrapers/discoverynews'


module Scrapers

  describe DiscoNews do
    it {should respond_to(:disco_downloads)}

    context "scraping" do
      let(:url) {"http://news.discovery.com/space/history-of-space/stunning-space-photos-week-june-9-14-pictures-130614.htm"}
      let(:images) do
        VCR.use_cassette('disconews.history-of-space') do
          Scrapers::DiscoNews.disco_downloads(url)
        end
      end

      it "retrieves an array of images" do
        images.should be_a(Array)
        images.each do |i|
          i.should =~ /^http:\/\/.*(jpe?g|png|gif)/
        end
      end
    end

  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
scrapers-3.2.0 spec/scrapers/discoverynews_spec.rb
scrapers-3.1.0 spec/scrapers/discoverynews_spec.rb
scrapers-3.0.0 spec/scrapers/discoverynews_spec.rb