Sha256: 4df4c8530e2c8ec72e71ab34f1f95da4f5e1fae9b7d0a216df90e44b6881c46d

Contents?: true

Size: 596 Bytes

Versions: 11

Compression:

Stored size: 596 Bytes

Contents

require "nicoquery/crawler/bulk_scraping"


describe "NicoQuery::Crawler" do
  describe "VideoArray" do
    before do
      @acquired_movies = []
      WebMock.disable! # TODO: WebMockを利用する。
      NicoQuery::Crawler::BulkScraping.execute(['sm20415650', 'sm9']) do |result|
        @acquired_movies.push result
      end
    end

    it "should sorted by published date" do
      expect(@acquired_movies[0].publish_date).to be
    end

    it "should scrape movie's info the number of times -1 that returns :continue" do
      expect(@acquired_movies.length).to eq 2
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
nicoquery-0.1.8.11 spec/crawler/bulk_scraping_spec.rb
nicoquery-0.1.8.10 spec/crawler/bulk_scraping_spec.rb
nicoquery-0.1.8.9 spec/crawler/bulk_scraping_spec.rb
nicoquery-0.1.8.8 spec/crawler/bulk_scraping_spec.rb
nicoquery-0.1.8.7 spec/crawler/bulk_scraping_spec.rb
nicoquery-0.1.8.6 spec/crawler/bulk_scraping_spec.rb
nicoquery-0.1.8.5 spec/crawler/bulk_scraping_spec.rb
nicoquery-0.1.8.4 spec/crawler/bulk_scraping_spec.rb
nicoquery-0.1.8.3 spec/crawler/bulk_scraping_spec.rb
nicoquery-0.1.8.2 spec/crawler/bulk_scraping_spec.rb
nicoquery-0.1.8 spec/crawler/bulk_scraping_spec.rb