Sha256: 65b4d3d2b96d0e3a51aafae4e0e2582af341132a69e91a8232ccdb213eb704c4

Contents?: true

Size: 676 Bytes

Versions: 4

Compression:

Stored size: 676 Bytes

Contents

module ThousandIsland
  describe StyleHash do
    let(:opts) { {size: 1, style: 2, other: 3} }
    let(:subject) { described_class.new(opts) }

    it 'is a Hash' do
      expect(subject).to be_a(Hash)
    end

    it 'returns nil as default key' do
     expect(subject[:made_up_key]).to be nil
    end

    it 'sets the passed options' do
      expect(subject[:size]).to eq(1)
      expect(subject[:style]).to eq(2)
      expect(subject[:other]).to eq(3)
    end

    it 'gets size value for the font_size key' do
      expect(subject[:font_size]).to eq(1)
    end

    it 'gets style value for the styles key' do
      expect(subject[:styles]).to eq([2])
    end

  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
thousand_island-0.1.2 spec/thousand_island/utilities/style_hash_spec.rb
thousand_island-0.1.1 spec/thousand_island/utilities/style_hash_spec.rb
thousand_island-0.1.0 spec/thousand_island/utilities/style_hash_spec.rb
thousand_island-0.0.1 spec/thousand_island/utilities/style_hash_spec.rb