Sha256: 78f74e3fec9553fb946d7f0586191abaede033ec21731714cba817868db64b8b

Contents?: true

Size: 491 Bytes

Versions: 1

Compression:

Stored size: 491 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

1 entries across 1 versions & 1 rubygems

Version Path
squib-0.10.0 spec/args/unit_conversion_spec.rb