Sha256: 1a930b341ff1e4cb455003c39bac7dad2cbfd39cf0ea301b7da5dc8124b5bcd5

Contents?: true

Size: 480 Bytes

Versions: 3

Compression:

Stored size: 480 Bytes

Contents


require 'test/unit'
require 'facet/ostructable'


# fixture

class Record
  include OpenStructable
end


# test

class TC_OpenStructable < Test::Unit::TestCase

  def test_record
    record = nil
    assert_nothing_raised {
      record = Record.new
      record.name    = "John Smith"
      record.age     = 70
      record.pension = 300
    }
    assert_equal( "John Smith", record.name )
    assert_equal( 70, record.age )
    assert_equal( nil, record.address )
  end
 
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
facets-0.7.0 test/tc_ostructable.rb
facets-0.7.1 test/tc_ostructable.rb
facets-0.7.2 test/tc_ostructable.rb