Sha256: 013160435d99bb0673ccf6cb0b5e7a069178030dc1c268717fbebbc742fd8e0f

Contents?: true

Size: 1.21 KB

Versions: 12

Compression:

Stored size: 1.21 KB

Contents

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

require 'rubygems'
require 'bundler/setup'

require 'rspec'
require 'logger'

require 'active_support'
require 'active_model'
require 'active_record'
require 'action_controller' # rspec-rails needs this :(

require 'closure_tree'

log = Logger.new(plugin_test_dir + "/debug.log")
log.sev_threshold = Logger::DEBUG
log.datetime_format = "%Y-%m-%d %H:%M:%S"
log.formatter = Logger::Formatter.new

ActiveRecord::Base.logger = log

require 'yaml'
require 'erb'
ENV["DB"] ||= "sqlite3mem"
ActiveRecord::Base.configurations = YAML::load(ERB.new(IO.read(plugin_test_dir + "/db/database.yml")).result)
ActiveRecord::Base.establish_connection(ENV["DB"])
ActiveRecord::Migration.verbose = false
load(File.join(plugin_test_dir, "db", "schema.rb"))

require 'support/models'
require 'rspec/rails' # TODO: clean this up-- I don't want to pull the elephant through the mouse hole just for fixture support

RSpec.configure do |config|
  config.fixture_path = "#{plugin_test_dir}/fixtures"
  # true runs the tests 1 second faster, but then you can't
  # see what's going on while debuggering with different db connections.
  config.use_transactional_fixtures = false
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
closure_tree-3.5.2 spec/spec_helper.rb
closure_tree-3.5.1 spec/spec_helper.rb
closure_tree-3.5.0 spec/spec_helper.rb
closure_tree-3.4.3 spec/spec_helper.rb
closure_tree-3.4.2 spec/spec_helper.rb
closure_tree-3.4.1 spec/spec_helper.rb
closure_tree-3.4.0 spec/spec_helper.rb
closure_tree-3.3.2 spec/spec_helper.rb
closure_tree-3.3.1 spec/spec_helper.rb
closure_tree-3.3.0 spec/spec_helper.rb
closure_tree-3.2.1 spec/spec_helper.rb
closure_tree-3.2.0 spec/spec_helper.rb