/vendor/gems/facets-2.4.5/test/more/test_snapshot.rb
Ruby | 21 lines | 14 code | 6 blank | 1 comment | 0 complexity | 15c606985485dce516885e69e9204310 MD5 | raw file
Possible License(s): GPL-3.0, GPL-2.0, IPL-1.0, AGPL-1.0, LGPL-3.0
- # Test lib/facets/snapshot.rb
- require 'facets/snapshot.rb'
- require 'test/unit'
- class TC_Snapshot < Test::Unit::TestCase
- def setup
- customer = Struct.new(:name, :address, :zip)
- joe = customer.new( "Joe Pitare", "1115 Lila Ln.", 47634 )
- @joe_snap = joe.take_snapshot
- end
- def test_storage
- assert_equal( "Joe Pitare", @joe_snap[:name] )
- assert_equal( "1115 Lila Ln.", @joe_snap[:address] )
- assert_equal( 47634, @joe_snap[:zip] )
- end
- end