Sha256: 765e87a4b9d683d0f75ad5166abeb9df542ce5d319739406957de853e40c7739

Contents?: true

Size: 1.15 KB

Versions: 3

Compression:

Stored size: 1.15 KB

Contents

ENV["RAILS_ENV"] = "test"

$:.unshift File.dirname(__FILE__)

require "rails_app/config/environment"
require 'test_help'

if ENV['NO_CONTEXT'] == 'true'
  Cms.setup do |config|
    config.context_class = nil
  end
end

ActiveRecord::Migration.verbose = false
ActiveRecord::Base.logger = Logger.new(nil)
ActiveRecord::Base.establish_connection(:adapter => "sqlite3", :database => ":memory:")

ActiveRecord::Migrator.migrate(File.join(File.dirname(__FILE__), "rails_app/db/migrate/"), nil)

require 'rubygems'
require 'ostruct'
require 'shoulda'
require 'factory_girl'

Factory.definition_file_paths << "#{File.dirname(__FILE__)}/factories"
Factory.find_definitions

module TestConfig
  mattr_reader :paperclip_test_root
  @@paperclip_test_root = File.join(File.dirname(__FILE__), 'paperclip')
end

require 'test_helpers/login_methods'
require 'test_helpers/asset_helpers'
require 'test_helpers/component_helpers'

class ActionController::TestCase
  include AssetHelpers
end
class ActiveSupport::TestCase
  include AssetHelpers
  include ComponentHelpers
end


class ActiveSupport::TestCase
  self.use_transactional_fixtures = true
  self.use_instantiated_fixtures = false
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
liquid_cms-0.2.2.0 test/test_helper.rb
liquid_cms-0.2.1.1 test/test_helper.rb
liquid_cms-0.2.1.0 test/test_helper.rb