Sha256: dcbfdaad4927357054a779b8ca1d1c27c56b2ca6372838fb6932b5b358188cb3

Contents?: true

Size: 533 Bytes

Versions: 14

Compression:

Stored size: 533 Bytes

Contents

require_relative '../../test_helper'

class BranchWithImplicitFromRequirementMatcherTest < StateMachinesTest
  def setup
    @matcher = StateMachines::BlacklistMatcher.new(:parked)
    @branch = StateMachines::Branch.new(@matcher => :idling)
  end

  def test_should_not_convert_from_to_whitelist_matcher
    assert_equal @matcher, @branch.state_requirements.first[:from]
  end

  def test_should_convert_to_to_whitelist_matcher
    assert_instance_of StateMachines::WhitelistMatcher, @branch.state_requirements.first[:to]
  end
end

Version data entries

14 entries across 14 versions & 2 rubygems

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