Sha256: c2123a76119b2e2b7a9acc972af1706d9a91db05a65d2469599951cf846fc78d
Contents?: true
Size: 490 Bytes
Versions: 8
Compression:
Stored size: 490 Bytes
Contents
require 'spec_helper' require 'squib/args/unit_conversion' describe Squib::Args::UnitConversion do it 'does nothing on just numbers' do expect(subject.parse(20)).to eq(20) end it 'strips trailing whitespace' do expect(subject.parse('1in ')).to eq(300) end it 'is ok w/internal whitesapce' do expect(subject.parse('1 in')).to eq(300) end it 'does cm' do expect(subject.parse('1cm')).to eq(118.1102361) end end
Version data entries
8 entries across 8 versions & 1 rubygems