Sha256: 1f865d46d4b4069af51ce6f39f34cde35d796d2128710c6285153214a26b1663
Contents?: true
Size: 687 Bytes
Versions: 8
Compression:
Stored size: 687 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/../test_helper') class EnumStateMachineByDefaultTest < MiniTest::Test def setup @klass = Class.new @machine = @klass.state_machine end def test_should_use_state_attribute assert_equal :state, @machine.attribute end end class EnumStateMachineTest < MiniTest::Test 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
8 entries across 8 versions & 1 rubygems