You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

47 lines
898 B

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 '#pt' do
it 'converts inches properly' do
expect(deck.points(1)).to eq 4.166666666666667
end
it 'handles strings too' do
expect(deck.points('1')).to eq 4.166666666666667
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