Sha256: 293e2dfc0d72c0626f100a5e4bc3a6457c43afdeca66620d5ac7c14992468c26

Contents?: true

Size: 408 Bytes

Versions: 14

Compression:

Stored size: 408 Bytes

Contents

require_relative '../../test_helper'

class EventContextTest < StateMachinesTest
  def setup
    @klass = Class.new
    @machine = StateMachines::Machine.new(@klass)
    @machine.events << @event = StateMachines::Event.new(@machine, :ignite, human_name: 'start')
  end

  def test_should_evaluate_within_the_event
    scope = nil
    @event.context { scope = self }
    assert_equal @event, scope
  end
end

Version data entries

14 entries across 14 versions & 2 rubygems

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