Sha256: 8525cd3ebc4ba37f6440bf813c09bd65a4f4b198e28445b0178e7f372f296a50

Contents?: true

Size: 704 Bytes

Versions: 4

Compression:

Stored size: 704 Bytes

Contents

require 'spec_helper'

describe Screenshots::Processor do

  describe ".generate" do
    it "generates an HTML section for one site" do
      url = 'http://www.google.com'
      html = Screenshots::Processor.generate(url)
      expect(html).to eq(TestData.google_html_section)
    end
  end

  describe ".generate_list" do
    it "generates HTML sections for a list of sites" do
      urls = [
        'http://www.google.com',
        'https://github.com/rails/rails?param=1&x=2'
      ]

      expected_output = TestData.google_html_section + "\n" + TestData.github_html_section + "\n"

      html = Screenshots::Processor.generate_list(urls)
      expect(html).to eq(expected_output)
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
screenshots-0.0.4 spec/screenshots/processor_spec.rb
screenshots-0.0.3 spec/screenshots/processor_spec.rb
screenshots-0.0.2 spec/screenshots/processor_spec.rb
screenshots-0.0.1 spec/screenshots/processor_spec.rb