Sha256: 3fc7d076544b1e5c0ab6e60b44c3179e480078c1ae65ff26894ace8a25049e53

Contents?: true

Size: 583 Bytes

Versions: 5

Compression:

Stored size: 583 Bytes

Contents

require 'spec_helper'

describe BrDanfe::Logo::Config do
  subject { described_class.new({}) }

  it 'returns the default config set in the code' do
    expect(subject.logo).to eql ''
    expect(subject.logo_dimensions).to eql({})
  end

  context 'when there are custom options' do
    subject { described_class.new({ logo: '/fake/path/file.png', logo_dimensions: { width: 50, height: 50 } }) }

    it 'returns the config set in params' do
      expect(subject.logo).to eql '/fake/path/file.png'
      expect(subject.logo_dimensions).to eql width: 50, height: 50
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
br_danfe-1.2.1 spec/br_danfe/logo_config_spec.rb
br_danfe-1.2.0 spec/br_danfe/logo_config_spec.rb
br_danfe-1.1.0 spec/br_danfe/logo_config_spec.rb
br_danfe-1.0.0 spec/br_danfe/logo_config_spec.rb
br_danfe-0.20.0 spec/br_danfe/logo_config_spec.rb