Sha256: 831727bc7cfe056f3e0db93d9530d8a7dbdd28db1f2f86b2bc7b8aa6f135031f
Contents?: true
Size: 1.24 KB
Versions: 3
Compression:
Stored size: 1.24 KB
Contents
require 'pathname' require 'fileutils' ROOT = Pathname(File.expand_path(File.join(File.dirname(__FILE__), '..'))) TEST_ASSETS_PATH = Pathname.new(ROOT).join('tmp', 'public') RSpec.configure do |config| config.mock_with :rspec config.after(:suite) do FileUtils.rm_rf TEST_ASSETS_PATH if File.exist?(TEST_ASSETS_PATH) end end require 'active_support' require 'action_pack' require 'action_view' require 'action_controller' require 'action_dispatch' require File.expand_path(File.join(File.dirname(__FILE__), '../lib/paperclip-globalize3')) ActiveRecord::Base.send(:include, Paperclip::Glue) # set up globalize3 and models (borrowed from globalize3) require 'fileutils' require 'logger' tmpdir = File.join(File.dirname(__FILE__), "../tmp") FileUtils.mkdir(tmpdir) unless File.exist?(tmpdir) log = File.expand_path(File.join(tmpdir, "globalize3_test.log")) FileUtils.touch(log) unless File.exists?(log) ActiveRecord::Base.logger = Logger.new(log) ActiveRecord::LogSubscriber.attach_to(:active_record) ActiveRecord::Base.establish_connection(:adapter => 'sqlite3', :database => ':memory:') require File.expand_path('../data/schema', __FILE__) require File.expand_path('../data/models', __FILE__) I18n.locale = I18n.default_locale = :en Globalize.locale = nil
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
paperclip-globalize3-1.1.0 | spec/spec_helper.rb |
paperclip-globalize3-1.0.0 | spec/spec_helper.rb |
paperclip-globalize3-0.1.0 | spec/spec_helper.rb |