Sha256: 2a218ce7c81afbe0abf01d250039ba909afc174cfda2284f146bbf8fe11895ec

Contents?: true

Size: 660 Bytes

Versions: 3

Compression:

Stored size: 660 Bytes

Contents

require 'test_helper'

class TC_testOptions < Clean::Test::TestCase
  include TestHelper
  include GLI

  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

3 entries across 3 versions & 1 rubygems

Version Path
gli-2.0.0.rc5 test/tc_options.rb
gli-2.0.0.rc4 test/tc_options.rb
gli-2.0.0.rc3 test/tc_options.rb