Sha256: 777f8ee0f8e27d282a89b278161c3f1d3055d84bd3276df8ec80dc495a1f904d
Contents?: true
Size: 663 Bytes
Versions: 2
Compression:
Stored size: 663 Bytes
Contents
require_relative '../lib/rationalist' require 'minitest/autorun' require 'minitest/expectations' describe 'dotted' do it 'dotted alias' do argv = Rationalist.parse(['--a.b', '22'], { default: { :'a.b' => 11 }, alias: { :'a.b' => 'aa.bb' } }); argv[:a][:b].must_equal(22) argv[:aa][:bb].must_equal(22) end it 'dotted default' do argv = Rationalist.parse('', { default: { :'a.b' => 11 }, alias: { :'a.b' => 'aa.bb' } }); argv[:a][:b].must_equal(11) argv[:aa][:bb].must_equal(11) end it 'dotted default with no alias' do argv = Rationalist.parse('', { default: { :'a.b' => 11 } }); argv[:a][:b].must_equal(11) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rationalist-2.0.1 | spec/dotted_spec.rb |
rationalist-2.0.0 | spec/dotted_spec.rb |