Sha256: 780795fd1b23e1158b6c22800098af94b7eb3f871bc4095b032f0789ee4bc529

Contents?: true

Size: 828 Bytes

Versions: 1

Compression:

Stored size: 828 Bytes

Contents

require 'spec_helper'

describe Squib::Deck do

  context '#hint' do

    it 'sets hinting to conf' do
      mock_conf = double(Squib::Conf)
      expect(mock_conf).to receive(:text_hint=).with(:cyan).once
      Squib::Deck.new do
        @conf = mock_conf
        hint text: :cyan
      end
    end

  end

  context '#set' do

    it 'puts font in @font' do
      deck = Squib::Deck.new do
        set font: 'foo'
      end
      expect(deck.font).to eq ('foo')
    end

    it 'raises deprecation errors on img_dir' do
      set_img_dir = Proc.new do
        Squib::Deck.new do
          set img_dir: 'foo'
        end
      end
      expect { set_img_dir.call }.to raise_error('DEPRECATED: As of v0.7 img_dir is no longer supported in "set". Use config.yml instead.')
    end

  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
squib-0.9.0 spec/api/api_settings_spec.rb