Sha256: a6e9c8e56a83a10bd1999a6e40bba8fffb75b8c0502d8e58fa59a84d7a666ab2

Contents?: true

Size: 1.11 KB

Versions: 1

Compression:

Stored size: 1.11 KB

Contents

# Make sure our default RAILS_ROOT from the helper plugin is in the load path
HELPER_RAILS_ROOT = "#{File.dirname(__FILE__)}/../generators/plugin_test_structure/templates/app_root" unless defined?(HELPER_RAILS_ROOT)
$:.unshift(HELPER_RAILS_ROOT)

# Determine the plugin's root test directory and add it to the load path
RAILS_ROOT = (File.directory?('./test/app_root') ? './test/app_root' : HELPER_RAILS_ROOT) unless defined?(RAILS_ROOT)
$:.unshift(RAILS_ROOT)

# Set the default environment to sqlite3's in_memory database
ENV['RAILS_ENV'] ||= 'in_memory'

# First boost the Rails framework
require 'config/boot'

# Extend it so that we can hook into the initialization process
require 'plugin_test_helper/extensions/initializer'

# Load the Rails environment and testing framework
require_or_load 'config/environment'
require_or_load 'test_help'

# Undo changes to RAILS_ENV
silence_warnings {RAILS_ENV = ENV['RAILS_ENV']}

# Set default fixture loading properties
class Test::Unit::TestCase #:nodoc:
  self.use_transactional_fixtures = true
  self.use_instantiated_fixtures  = false
  self.fixture_path = "#{RAILS_ROOT}/../fixtures"
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
plugin_test_helper-0.1.3 lib/plugin_test_helper.rb