Sha256: c5a2d41b7b8bb05d5e9a4b0f5169636f76b703b8bfeade3560ae813bb5116ee6

Contents?: true

Size: 340 Bytes

Versions: 3

Compression:

Stored size: 340 Bytes

Contents

require "helper"

class Bus
  include Transitions

  state_machine do
    state :parking
  end
end

class TestStatePredicateMethod < Test::Unit::TestCase
  def setup
    @bus = Bus.new
  end

  test "should generate predicate methods for states" do
    assert_true @bus.respond_to?(:parking?)
    assert_true @bus.send(:parking?)
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
transitions-0.1.3 test/state/test_state_predicate_method.rb
transitions-0.1.2 test/state/test_state_predicate_method.rb
transitions-0.1.1 test/state/test_state_predicate_method.rb