Sha256: ac5ad5f6ea01711811743c49b2ba832cbc10c0cee341a82e2e0cc37b559b5825

Contents?: true

Size: 715 Bytes

Versions: 2

Compression:

Stored size: 715 Bytes

Contents

require 'spec_helper'

describe Squib::Deck do

  let(:deck) { Squib::Deck.new }

  context '#in' do
    it 'converts inches properly' do
      expect(deck.inches(1)).to eq 300
    end

    it 'handles strings too' do
      expect(deck.inches('1')).to eq 300
    end
  end

  context '#cm' do
    it 'converts inches properly' do
      expect(deck.cm(1)).to eq 118.1102361
    end

    it 'handles strings too' do
      expect(deck.cm('1')).to eq 118.1102361
    end
  end

  context '#mm' do
    it 'converts inches properly' do
      expect(deck.mm(1)).to eq 11.81102361
    end

    it 'handles strings too' do
      expect(deck.mm('1')).to eq 11.81102361
    end
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
squib-0.12.0 spec/api/api_units_spec.rb
squib-0.11.0 spec/api/api_units_spec.rb