class ActiveRecordTest::MachineWithCustomAttributeTest
Public Instance Methods
setup()
click to toggle source
# File test/unit/integrations/active_record_test.rb, line 515 def setup require 'stringio' @original_stderr, $stderr = $stderr, StringIO.new @model = new_model @machine = StateMachine::Machine.new(@model, :public_state, :attribute => :state) @record = @model.new end
teardown()
click to toggle source
# File test/unit/integrations/active_record_test.rb, line 528 def teardown $stderr = @original_stderr end
test_should_not_delegate_attribute_predicate_with_different_attribute()
click to toggle source
# File test/unit/integrations/active_record_test.rb, line 524 def test_should_not_delegate_attribute_predicate_with_different_attribute assert_raise(ArgumentError) { @record.public_state? } end