class ActiveRecordTest::MachineWithoutDatabaseTest
Public Class Methods
connection()
click to toggle source
Simulate the database not being available entirely
# File test/unit/integrations/active_record_test.rb, line 101 def self.connection raise ActiveRecord::ConnectionNotEstablished end
Public Instance Methods
setup()
click to toggle source
# File test/unit/integrations/active_record_test.rb, line 98 def setup @model = new_model(false) do # Simulate the database not being available entirely def self.connection raise ActiveRecord::ConnectionNotEstablished end end end
test_should_allow_machine_creation()
click to toggle source
# File test/unit/integrations/active_record_test.rb, line 107 def test_should_allow_machine_creation assert_nothing_raised { StateMachine::Machine.new(@model) } end