Sha256: 51ba1abc9750b22ff1b5666f88d7c1941884b1b0795241b76b1c08b158a9e98d

Contents?: true

Size: 659 Bytes

Versions: 14

Compression:

Stored size: 659 Bytes

Contents

require_relative '../../test_helper'

class EventCollectionByDefaultTest < StateMachinesTest
  def setup
    @klass = Class.new
    @machine = StateMachines::Machine.new(@klass)
    @events = StateMachines::EventCollection.new(@machine)
    @object = @klass.new
  end

  def test_should_not_have_any_nodes
    assert_equal 0, @events.length
  end

  def test_should_have_a_machine
    assert_equal @machine, @events.machine
  end

  def test_should_not_have_any_valid_events_for_an_object
    assert @events.valid_for(@object).empty?
  end

  def test_should_not_have_any_transitions_for_an_object
    assert @events.transitions_for(@object).empty?
  end
end

Version data entries

14 entries across 14 versions & 2 rubygems

Version Path
state_machines-0.5.0 test/unit/event_collection/event_collection_by_default_test.rb
solidus_backend-1.0.0.pre3 vendor/bundle/gems/state_machines-0.2.2/test/unit/event_collection/event_collection_by_default_test.rb
solidus_backend-1.0.0.pre2 vendor/bundle/gems/state_machines-0.2.2/test/unit/event_collection/event_collection_by_default_test.rb
solidus_backend-1.0.0.pre vendor/bundle/gems/state_machines-0.2.2/test/unit/event_collection/event_collection_by_default_test.rb
state_machines-0.4.0 test/unit/event_collection/event_collection_by_default_test.rb
state_machines-0.3.0 test/unit/event_collection/event_collection_by_default_test.rb
state_machines-0.2.2 test/unit/event_collection/event_collection_by_default_test.rb
state_machines-0.2.1 test/unit/event_collection/event_collection_by_default_test.rb
state_machines-0.2.0 test/unit/event_collection/event_collection_by_default_test.rb
state_machines-0.1.4 test/unit/event_collection/event_collection_by_default_test.rb
state_machines-0.1.3 test/unit/event_collection/event_collection_by_default_test.rb
state_machines-0.1.2 test/unit/event_collection/event_collection_by_default_test.rb
state_machines-0.1.1 test/unit/event_collection/event_collection_by_default_test.rb
state_machines-0.1.0 test/unit/event_collection/event_collection_by_default_test.rb