Sha256: 40a29077ad7ba6516ab71e3d2449362c6db45e76fab2ba40a03bc56166a51079
Contents?: true
Size: 1.37 KB
Versions: 6
Compression:
Stored size: 1.37 KB
Contents
require 'rubygems' require 'rspec' require 'active_record' require 'active_record/version' require 'active_support' require 'active_support/core_ext' require 'mocha/api' require 'bourne' require 'ostruct' require 'pathname' require 'activerecord-import' ROOT = Pathname(File.expand_path(File.join(File.dirname(__FILE__), '..'))) puts "Testing against version #{ActiveRecord::VERSION::STRING}" $LOAD_PATH << File.join(ROOT, 'lib') $LOAD_PATH << File.join(ROOT, 'lib', 'paperclip') require File.join(ROOT, 'lib', 'paperclip.rb') FIXTURES_DIR = File.join(File.dirname(__FILE__), "fixtures") config = YAML::load(IO.read(File.dirname(__FILE__) + '/database.yml')) ActiveRecord::Base.logger = Logger.new(File.dirname(__FILE__) + "/debug.log") ActiveRecord::Base.establish_connection(config['test']) unless ActiveRecord::VERSION::STRING < "4.2" ActiveRecord::Base.raise_in_transactional_callbacks = true end Paperclip.options[:logger] = ActiveRecord::Base.logger Dir[File.join(ROOT, 'spec', 'support', '**', '*.rb')].each{|f| require f } Rails = FakeRails.new('test', Pathname.new(ROOT).join('tmp')) ActiveSupport::Deprecation.silenced = true RSpec.configure do |config| config.include Assertions config.include ModelReconstruction config.include TestData config.include Reporting config.extend VersionHelper config.mock_framework = :mocha config.before(:all) do rebuild_model end end
Version data entries
6 entries across 6 versions & 3 rubygems