class ActiveRecordTest::MachineWithConflictingStateNameTest
Public Instance Methods
setup()
click to toggle source
# File test/unit/integrations/active_record_test.rb, line 358 def setup require 'stringio' @original_stderr, $stderr = $stderr, StringIO.new @model = new_model end
teardown()
click to toggle source
# File test/unit/integrations/active_record_test.rb, line 379 def teardown $stderr = @original_stderr end
test_should_output_warning_with_same_machine_attribute()
click to toggle source
# File test/unit/integrations/active_record_test.rb, line 372 def test_should_output_warning_with_same_machine_attribute @machine = StateMachine::Machine.new(@model, :public_state, :attribute => :state) @machine.state :state assert_match /^Instance method "state\?" is already defined in ActiveRecordTest::Foo, use generic helper instead.*\n$/, $stderr.string end
test_should_output_warning_with_same_machine_name()
click to toggle source
# File test/unit/integrations/active_record_test.rb, line 365 def test_should_output_warning_with_same_machine_name @machine = StateMachine::Machine.new(@model) @machine.state :state assert_match /^Instance method "state\?" is already defined in ActiveRecordTest::Foo, use generic helper instead.*\n$/, $stderr.string end