Sha256: 2be4cd32b08fd337199a4961adc5bd81d240f44b29bea87f54502fe358078e2e

Contents?: true

Size: 825 Bytes

Versions: 23

Compression:

Stored size: 825 Bytes

Contents

=begin rdoc

= DISCOVERYNEWS_SPEC.RB

*Author*::      Tamara Temple <tamouse@gmail.com>
*Since*::       2013-06-15
*Copyright*::   (c) 2013 Tamara Temple Web Development
*License*::     MIT
  
=end

require 'spec_helper'


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

23 entries across 23 versions & 1 rubygems

Version Path
scrapers-2.1.0 spec/scrapers/discoverynews_spec.rb
scrapers-2.0.2 spec/scrapers/discoverynews_spec.rb
scrapers-2.0.1 spec/scrapers/discoverynews_spec.rb
scrapers-2.0.0 spec/scrapers/discoverynews_spec.rb
scrapers-1.5.6 spec/scrapers/discoverynews_spec.rb
scrapers-1.5.5 spec/scrapers/discoverynews_spec.rb
scrapers-1.5.4 spec/scrapers/discoverynews_spec.rb
scrapers-1.5.3 spec/scrapers/discoverynews_spec.rb
scrapers-1.5.2 spec/scrapers/discoverynews_spec.rb
scrapers-1.5.1 spec/scrapers/discoverynews_spec.rb
scrapers-1.5.0 spec/scrapers/discoverynews_spec.rb
scrapers-1.4.0 spec/scrapers/discoverynews_spec.rb
scrapers-1.3.0 spec/scrapers/discoverynews_spec.rb
scrapers-1.2.0 spec/scrapers/discoverynews_spec.rb
scrapers-1.1.0 spec/scrapers/discoverynews_spec.rb
scrapers-1.0.0 spec/scrapers/discoverynews_spec.rb
scrapers-0.4.3 spec/scrapers/discoverynews_spec.rb
scrapers-0.4.2 spec/scrapers/discoverynews_spec.rb
scrapers-0.4.1 spec/scrapers/discoverynews_spec.rb
scrapers-0.4.0 spec/scrapers/discoverynews_spec.rb