Sha256: ad4309f33c771c5c288743276f7515161e1bc03f6759413843159167a59b2c62

Contents?: true

Size: 311 Bytes

Versions: 4

Compression:

Stored size: 311 Bytes

Contents

covers 'facets/hash/to_struct'

testcase Hash do

  unit :to_struct do
    h = {:name=>"Dan","age"=>33,"rank"=>"SrA","grade"=>"E4"}
    s = h.to_struct("Foo")

    s.name.assert  = "Dan"
    s.age.assert   = 33
    s.rank.assert  = "SrA"
    s.grade.assert = "E4"

    #Foo.assert.is_a?(Struct) ?
  end
  
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
facets-2.9.1 test/core/hash/test_to_struct.rb
facets-2.9.0 test/core/hash/test_to_struct.rb
facets-2.9.0.pre.2 test/core/hash/test_to_struct.rb
facets-2.9.0.pre.1 test/core/hash/test_to_struct.rb