Sha256: 9d3891dd1f93476d4e49ff0e5b6886f20f311a66a8fc96432c664f28dc4b6c1c

Contents?: true

Size: 420 Bytes

Versions: 14

Compression:

Stored size: 420 Bytes

Contents

require_relative '../../test_helper'

class StateMachineTest < StateMachinesTest
  def setup
    @klass = Class.new
  end

  def test_should_allow_state_machines_on_any_class
    assert @klass.respond_to?(:state_machine)
  end

  def test_should_evaluate_block_within_machine_context
    responded = false
    @klass.state_machine(:state) do
      responded = respond_to?(:event)
    end

    assert responded
  end
end

Version data entries

14 entries across 14 versions & 2 rubygems

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