Sha256: a13d0f06f1051333c25057aa5085b573641fc87fc78b35c569cc7f11890575e8
Contents?: true
Size: 619 Bytes
Versions: 11
Compression:
Stored size: 619 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 test 'should raise `InvalidMethodOverride` if we try to overwrite existing methods' do assert_raise(Transitions::InvalidMethodOverride) do Class.new do include Transitions state_machine do state :frozen end end end end end
Version data entries
11 entries across 11 versions & 1 rubygems