Sha256: 90a8f703c3ca1e91f000d2c8394f76512d0fee959b822e2ef431aaf812d9837c
Contents?: true
Size: 537 Bytes
Versions: 14
Compression:
Stored size: 537 Bytes
Contents
require_relative '../../test_helper' require_relative '../../files/node' class NodeCollectionWithSymbolIndexTest < StateMachinesTest def setup machine = StateMachines::Machine.new(Class.new) @collection = StateMachines::NodeCollection.new(machine, index: [:name, :value]) @parked = Node.new('parked', 1) @collection << @parked end def test_should_index_by_name assert_equal @parked, @collection['parked'] end def test_should_index_by_symbol_name assert_equal @parked, @collection[:parked] end end
Version data entries
14 entries across 14 versions & 2 rubygems