Sha256: 99990bf1fc686cc3f6c5ab9712c17813b4928c94fffa18e879ecc6d851b926b1
Contents?: true
Size: 554 Bytes
Versions: 2
Compression:
Stored size: 554 Bytes
Contents
require_relative '../lib/rationalist' require 'minitest/autorun' require 'minitest/expectations' describe 'num' do it 'nums' do argv = Rationalist.parse([ '-x', '1234', '-y', '5.67', '-z', '1e7', '-w', '10f', '--hex', '0xdeadbeef', '789' ]) argv.must_equal({ x: 1234, y: 5.67, z: 1e7, w: '10f', hex: 0xdeadbeef, _: [789] }) end it 'already a number' do argv = Rationalist.parse([ '-x', 1234, 789 ]); argv.must_equal({ x: 1234, _: [789] }); end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rationalist-2.0.1 | spec/num_spec.rb |
rationalist-2.0.0 | spec/num_spec.rb |