class StateWithConflictingHelpersAfterDefinitionTest
Public Instance Methods
parked?()
click to toggle source
# File test/unit/state_test.rb, line 496 def parked? 0 end
setup()
click to toggle source
# File test/unit/state_test.rb, line 491 def setup require 'stringio' @original_stderr, $stderr = $stderr, StringIO.new @klass = Class.new do def parked? 0 end end @machine = StateMachine::Machine.new(@klass) @machine.state :parked @object = @klass.new end
teardown()
click to toggle source
# File test/unit/state_test.rb, line 523 def teardown $stderr = @original_stderr end
test_should_not_output_warning()
click to toggle source
# File test/unit/state_test.rb, line 519 def test_should_not_output_warning assert_equal '', $stderr.string end
test_should_not_override_state_predicate()
click to toggle source
# File test/unit/state_test.rb, line 505 def test_should_not_override_state_predicate assert_equal 0, @object.parked? end
test_should_still_allow_super_chaining()
click to toggle source
# File test/unit/state_test.rb, line 509 def test_should_still_allow_super_chaining @klass.class_eval do def parked? super end end assert_equal false, @object.parked? end