Sha256: 8b5def5022cfab342502144f88553626d1325e36d523e9fc6832118425f0751b

Contents?: true

Size: 651 Bytes

Versions: 16

Compression:

Stored size: 651 Bytes

Contents

require 'gli.rb'
require 'test/unit'

include GLI
class TC_testOptions < Test::Unit::TestCase

  def test_by_method
    o = Options.new
    o.name = 'verbose'
    assert_equal 'verbose', o.name
    assert_equal 'verbose', o[:name]
    assert_equal 'verbose', o['name']
  end
  
  def test_by_string
    o = Options.new
    o['name'] = 'verbose'
    assert_equal 'verbose', o.name
    assert_equal 'verbose', o[:name]
    assert_equal 'verbose', o['name']
  end
  
  def test_by_symbol
    o = Options.new
    o[:name] = 'verbose'
    assert_equal 'verbose', o.name
    assert_equal 'verbose', o[:name]
    assert_equal 'verbose', o['name']
  end

end

Version data entries

16 entries across 16 versions & 2 rubygems

Version Path
brightbox-cli-0.18.1 lib/brightbox-cli/vendor/gli/test/tc_options.rb
brightbox-cli-0.18.0 lib/brightbox-cli/vendor/gli/test/tc_options.rb
brightbox-cli-0.17.5 lib/brightbox-cli/vendor/gli/test/tc_options.rb
brightbox-cli-0.17.4 lib/brightbox-cli/vendor/gli/test/tc_options.rb
brightbox-cli-0.17.3 lib/brightbox-cli/vendor/gli/test/tc_options.rb
brightbox-cli-0.17.2 lib/brightbox-cli/vendor/gli/test/tc_options.rb
brightbox-cli-0.17.1 lib/brightbox-cli/vendor/gli/test/tc_options.rb
brightbox-cli-0.17.0 lib/brightbox-cli/vendor/gli/test/tc_options.rb
brightbox-cli-0.16.0 lib/brightbox-cli/vendor/gli/test/tc_options.rb
brightbox-cli-0.15.0 lib/brightbox-cli/vendor/gli/test/tc_options.rb
brightbox-cli-0.14.1 lib/brightbox-cli/vendor/gli/test/tc_options.rb
brightbox-cli-0.14.0 lib/brightbox-cli/vendor/gli/test/tc_options.rb
brightbox-cli-0.13.1 lib/brightbox-cli/vendor/gli/test/tc_options.rb
bbcloud-0.13.0 lib/bbcloud/vendor/gli/test/tc_options.rb
brightbox-cli-0.13.0 lib/brightbox-cli/vendor/gli/test/tc_options.rb
bbcloud-0.12.0 lib/bbcloud/vendor/gli/test/tc_options.rb