Sha256: d92a6421aae38b2228c1b98f467c52ac4cf5ec6fc63954b844922dcbd8ddcb66
Contents?: true
Size: 1.03 KB
Versions: 1
Compression:
Stored size: 1.03 KB
Contents
# _____ _ # |_ _|__ ___| |_ # | |/ _ \/ __| __| # | | __/\__ \ |_ # |_|\___||___/\__| # # for lib/facets/more/association.rb # # Extracted Mon Jun 05 08:14:29 EDT 2006 # Unit Tools Reap Test Extractor # require 'facets/more/association.rb' require 'test/unit' class TC01 < Test::Unit::TestCase def setup @complex_hierarchy = [ 'parent' >> 'child', 'childless', 'another_parent' >> [ 'subchildless', 'subparent' >> 'subchild' ] ] end def test_ohash k,v = [],[] ohash = [ 'A' >> '3', 'B' >> '2', 'C' >> '1' ] ohash.each { |e1,e2| k << e1 ; v << e2 } assert_equal( ['A','B','C'], k ) assert_equal( ['3','2','1'], v ) end def test_complex complex = [ 'Drop Menu' >> [ 'Button 1', 'Button 2', 'Button 3' ], 'Help' ] assert_equal( 'Drop Menu', complex[0].index ) end def test_associations complex = [ :a >> :b, :a >> :c ] assert_equal( [ :b, :c ], :a.associations ) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
facets-1.4.0 | test/lib/facets/more/test_association.rb |