Sha256: eb75cedbf40926e3d3d378822a578fdac66641011ec439c23676f9db20796517

Contents?: true

Size: 636 Bytes

Versions: 30

Compression:

Stored size: 636 Bytes

Contents

require 'spec_helper'

describe LinkThumbnailer::Page do

  let(:url)       { 'http://foo.com' }
  let(:instance)  { described_class.new(url, options) }

  context 'with inline options' do

    let(:options) { { image_limit: 2 } }

    it { expect(instance.config.image_limit).to eq(2) }
    it { expect(instance.config.user_agent).to eq(LinkThumbnailer.config.user_agent) }

  end

  context 'without inline options' do

    let(:options) { {} }

    it { expect(instance.config.image_limit).to eq(LinkThumbnailer.config.image_limit) }
    it { expect(instance.config.user_agent).to eq(LinkThumbnailer.config.user_agent) }

  end

end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
link_thumbnailer-3.3.1 spec/page_spec.rb
link_thumbnailer-3.3.0 spec/page_spec.rb
link_thumbnailer-3.2.1 spec/page_spec.rb
link_thumbnailer-3.2.0 spec/page_spec.rb
link_thumbnailer-3.1.2 spec/page_spec.rb
link_thumbnailer-3.1.1 spec/page_spec.rb
link_thumbnailer-3.1.0 spec/page_spec.rb
link_thumbnailer-3.0.3 spec/page_spec.rb
link_thumbnailer-3.0.2 spec/page_spec.rb
link_thumbnailer-3.0.1 spec/page_spec.rb
link_thumbnailer-3.0.0 spec/page_spec.rb
link_thumbnailer-2.6.1 spec/page_spec.rb
link_thumbnailer-2.6.0 spec/page_spec.rb
link_thumbnailer-2.5.2 spec/page_spec.rb
link_thumbnailer-2.5.1 spec/page_spec.rb
link_thumbnailer-2.5.0 spec/page_spec.rb
link_thumbnailer-2.4.0 spec/page_spec.rb
link_thumbnailer-2.3.2 spec/page_spec.rb
link_thumbnailer-2.3.1 spec/page_spec.rb
link_thumbnailer-2.3.0 spec/page_spec.rb