Sha256: 2063e67a1d337ad5dbc87d1b6eae76f7c5241645b137511687580cf954eae31b

Contents?: true

Size: 1.32 KB

Versions: 1

Compression:

Stored size: 1.32 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"
$:.unshift(HELPER_RAILS_ROOT)

# Determine the plugin's root test directory and add it to the load path
unless defined?(RAILS_ROOT)
  root_path = File.join(File.expand_path('.'), 'test/app_root')

  unless RUBY_PLATFORM =~ /(:?mswin|mingw)/
    require 'pathname'
    root_path = Pathname.new(root_path).cleanpath(true).to_s
  end

  RAILS_ROOT = root_path
end

$:.unshift(RAILS_ROOT)

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

# Load the default framework libraries
require 'config/boot'
require 'active_support'
require 'action_controller'

# Load extensions for helping determine where certain environment files are
# located
require 'plugin_test_helper/generator'
require 'plugin_test_helper/extensions/initializer'
require 'plugin_test_helper/extensions/routing'

# Load the Rails environment and testing framework
require 'config/environment'
require '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
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
plugin_test_helper-0.0.2 lib/plugin_test_helper.rb