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-2.2.3 spec/models/title_spec.rb
link_thumbnailer-2.2.2 spec/models/title_spec.rb
link_thumbnailer-2.2.1 spec/models/title_spec.rb
link_thumbnailer-2.2.0 spec/models/title_spec.rb
link_thumbnailer-2.1.0 spec/models/title_spec.rb
link_thumbnailer-2.0.4 spec/models/title_spec.rb
link_thumbnailer-2.0.3 spec/models/title_spec.rb
link_thumbnailer-2.0.2 spec/models/title_spec.rb
link_thumbnailer-2.0.1 spec/models/title_spec.rb
link_thumbnailer-2.0.0 spec/models/title_spec.rb