class MongoMapperTest::MachineWithoutDatabaseTest
Public Class Methods
connection()
click to toggle source
Simulate the database not being available entirely
# File test/unit/integrations/mongo_mapper_test.rb, line 67 def self.connection raise Mongo::ConnectionFailure end
Public Instance Methods
setup()
click to toggle source
# File test/unit/integrations/mongo_mapper_test.rb, line 64 def setup @model = new_model do # Simulate the database not being available entirely def self.connection raise Mongo::ConnectionFailure end end end
test_should_allow_machine_creation()
click to toggle source
# File test/unit/integrations/mongo_mapper_test.rb, line 73 def test_should_allow_machine_creation assert_nothing_raised { StateMachine::Machine.new(@model) } end