Sha256: 4e428a8ee801068867b13ce9772df46b56efcaaa91b527c568770a5c449e3815

Contents?: true

Size: 1.22 KB

Versions: 5

Compression:

Stored size: 1.22 KB

Contents

require 'rubygems'
require 'test/unit'
require 'active_support'
require 'active_record'
require 'active_record/fixtures'

ActiveRecord::Base.configurations = YAML::load(IO.read(File.dirname(__FILE__) + '/database.yml'))
ActiveRecord::Base.establish_connection('test')
ActiveRecord::Base.logger = Logger.new(File.dirname(__FILE__) + "/debug.log")

load(File.dirname(__FILE__) + "/schema.rb")

$LOAD_PATH.unshift(File.dirname(__FILE__))
require 'magic_cache_keys'
 
class ActiveSupport::TestCase
  include ActiveRecord::TestFixtures

  def create_fixtures(*table_names)
    if block_given?
      Fixtures.create_fixtures(Test::Unit::TestCase.fixture_path, table_names) { yield }
    else
      Fixtures.create_fixtures(Test::Unit::TestCase.fixture_path, table_names)
    end
  end
 
  # Turn off transactional fixtures if you're working with MyISAM tables in MySQL
  self.use_transactional_fixtures = true
  
  # Instantiated fixtures are slow, but give you @david where you otherwise would need people(:david)
  self.use_instantiated_fixtures  = false
 
  # Add more helper methods to be used by all tests here...
end

ActiveSupport::TestCase.fixture_path = File.dirname(__FILE__) + "/fixtures/"
$LOAD_PATH.unshift(ActiveSupport::TestCase.fixture_path)

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
staugaard-magic_cache_keys-0.2.0 test/test_helper.rb
staugaard-magic_cache_keys-0.3.0 test/test_helper.rb
staugaard-magic_cache_keys-0.4.0 test/test_helper.rb
staugaard-magic_cache_keys-0.5.0 test/test_helper.rb
staugaard-magic_cache_keys-0.6.0 test/test_helper.rb