Sha256: 62cdb0ac94b900d0d510a263d0bc38925b724492af1121a9a25354f06f538a6f

Contents?: true

Size: 403 Bytes

Versions: 30

Compression:

Stored size: 403 Bytes

Contents

require 'spec_helper'

describe LinkThumbnailer::Models::Title do

  let(:node)      { double(text: 'bar') }
  let(:instance)  { described_class.new(node, text) }

  context 'when text provided' do

    let(:text) { 'foo' }

    it { expect(instance.to_s).to eq(text) }

  end

  context 'when text not provided' do

    let(:text) { nil }

    it { expect(instance.to_s).to eq(node.text) }

  end

end

Version data entries

30 entries across 30 versions & 1 rubygems

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