Sha256: 1b9000002f206e6d59dc08ea4289e18e885c1bf4a1de541e32ae187626000688

Contents?: true

Size: 745 Bytes

Versions: 2

Compression:

Stored size: 745 Bytes

Contents

require_relative '../lib/rationalist'
require 'minitest/autorun'
require 'minitest/expectations'

describe 'long' do
  it 'long boolean' do
    Rationalist.parse([ '--bool' ]).must_equal({ bool: true, _: [] })
  end

  it 'long capture sp' do
    Rationalist.parse([ '--pow', 'xixxle' ]).must_equal({ pow: 'xixxle', _: [] })
  end

  it 'long capture eq' do
    Rationalist.parse([ '--pow=xixxle' ]).must_equal({ pow: 'xixxle', _: [] })
  end

  it 'long captures sp' do
    Rationalist.parse([ '--host', 'localhost', '--port', '555' ]).must_equal({ host: 'localhost', port: 555, _: [] })
  end

  it 'long captures eq' do
    Rationalist.parse([ '--host=localhost', '--port=555' ]).must_equal({ host: 'localhost', port: 555, _: [] })
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rationalist-2.0.1 spec/long_spec.rb
rationalist-2.0.0 spec/long_spec.rb