Sha256: 0e851f1b3761870c63c4a6e8345a808ab7b4bc7da64ebe0b7ce5862b1206951a

Contents?: true

Size: 1.47 KB

Versions: 9

Compression:

Stored size: 1.47 KB

Contents

$:.unshift(File.dirname(__FILE__) + '/../lib')

require 'rubygems'
require 'test/unit'
require 'active_record'
require 'active_record/fixtures'
require 'active_support/test_case'
#require 'active_support/binding_of_caller'
#require 'active_support/breakpoint'
require "#{File.dirname(__FILE__)}/../lib/sentry"

config_location = File.dirname(__FILE__) + '/database.yml'

config = YAML::load(IO.read(config_location))
ActiveRecord::Base.logger = Logger.new(File.dirname(__FILE__) + "/debug.log")
ActiveRecord::Base.establish_connection(config[ENV['DB'] || 'mysql'])
ActiveRecord::Base.configurations["test"] = "lolcatz"

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

class ActiveSupport::TestCase #:nodoc:
  include ActiveRecord::TestFixtures
  #def create_fixtures(*table_names)
  #  if block_given?
  #    Fixtures.create_fixtures(ActiveSupport::TestCase.fixture_path, table_names) { yield }
  #  else
  #    Fixtures.create_fixtures(ActiveSupport::TestCase.fixture_path, table_names)
  #  end
  #end

  self.use_instantiated_fixtures  = false
  self.use_transactional_fixtures = true
end

def create_fixtures(*table_names, &block)
  Fixtures.create_fixtures(ActiveSupport::TestCase.fixture_path, table_names, {}, &block)
end



ActiveSupport::TestCase.fixture_path = File.dirname(__FILE__) + "/fixtures/"
ActiveSupport::TestCase.use_instantiated_fixtures = true
ActiveSupport::TestCase.use_transactional_fixtures = (ENV['AR_TX_FIXTURES'] == "yes")
$LOAD_PATH.unshift(ActiveSupport::TestCase.fixture_path)

Version data entries

9 entries across 9 versions & 5 rubygems

Version Path
loyal3-sentry-0.4.2 test/abstract_unit.rb
loyal3-sentry-0.4.3 test/abstract_unit.rb
loyal3-sentry-0.4.4 test/abstract_unit.rb
loyal3-sentry-0.5.0 test/abstract_unit.rb
loyal3-sentry-0.5.2 test/abstract_unit.rb
pivotal-sentry-0.4.0 test/abstract_unit.rb
shipstar-sentry-0.5.2.1 test/abstract_unit.rb
stderr-sentry-0.5.4 test/abstract_unit.rb
sentry-0.5.3 test/abstract_unit.rb