class Cranium::TestFramework::DatabaseEntity

Attributes

connection[R]
entity_name[R]

Public Class Methods

cleanup() click to toggle source
# File lib/cranium/test_framework/database_entity.rb, line 22
def cleanup
  entities_created.each { |entity| entity.destroy }
  @entities_created = []
end
entities_created() click to toggle source
# File lib/cranium/test_framework/database_entity.rb, line 16
def entities_created
  @entities_created ||= []
end
new(entity, db_connection) click to toggle source
# File lib/cranium/test_framework/database_entity.rb, line 8
def initialize(entity, db_connection)
  @entity_name, @connection = entity, db_connection
end