Sha256: 074694db9cbaa7c3cd912d6c2a61a60373e12a75b773e3eb099170b9a95e2c53
Contents?: true
Size: 931 Bytes
Versions: 14
Compression:
Stored size: 931 Bytes
Contents
require_relative '../../test_helper' class NodeCollectionWithoutIndicesTest < StateMachinesTest def setup machine = StateMachines::Machine.new(Class.new) @collection = StateMachines::NodeCollection.new(machine, index: {}) end def test_should_allow_adding_node @collection << Object.new assert_equal 1, @collection.length end def test_should_not_allow_keys_retrieval exception = assert_raises(ArgumentError) { @collection.keys } assert_equal 'No indices configured', exception.message end def test_should_not_allow_lookup @collection << Object.new exception = assert_raises(ArgumentError) { @collection[0] } assert_equal 'No indices configured', exception.message end def test_should_not_allow_fetching @collection << Object.new exception = assert_raises(ArgumentError) { @collection.fetch(0) } assert_equal 'No indices configured', exception.message end end
Version data entries
14 entries across 14 versions & 2 rubygems