Sha256: 8b6471c8bda74d5a6a7eae81899d5795914b77a66c3f06a34b2b1e75ee1bb7bc

Contents?: true

Size: 1.2 KB

Versions: 108

Compression:

Stored size: 1.2 KB

Contents

# allows testing with edge Rails by creating a test/rails symlink
linked_rails = File.dirname(__FILE__) + '/rails'

if File.exists?(linked_rails) && !$:.include?(linked_rails + '/activesupport/lib')
  puts "[ using linked Rails ]"
  $:.unshift linked_rails + '/activesupport/lib'
  $:.unshift linked_rails + '/actionpack/lib'
  $:.unshift linked_rails + '/railties/lib'
end
require 'rubygems'
require 'action_controller'
require 'action_view'

begin
  # Necessary for Rails 3
  require 'rails'
rescue LoadError
  # Necessary for Rails 2.3.7
  require 'initializer'
rescue LoadError
end

if defined?(Rails::Application) # Rails 3
  class TestApp < Rails::Application
    config.root = File.join(File.dirname(__FILE__), "../..")
  end
  Rails.application = TestApp
elsif defined?(RAILS_ROOT)
  RAILS_ROOT.replace(File.join(File.dirname(__FILE__), "../.."))
else
  RAILS_ROOT = File.join(File.dirname(__FILE__), "../..")
end

ActionController::Base.logger = Logger.new(nil)

# Load plugins from test/plugins.
# This will only work with very basic plugins,
# since we don't want to load the entirety of Rails.
Dir[File.dirname(__FILE__) + '/plugins/*'].each do |plugin|
  $: << plugin + '/lib'
  eval(File.read(plugin + '/init.rb'))
end

Version data entries

108 entries across 108 versions & 4 rubygems

Version Path
haml-3.1.0.alpha.36 test/linked_rails.rb
haml-3.1.0.alpha.33 test/linked_rails.rb
haml-3.0.24 test/linked_rails.rb
haml-3.0.23 test/linked_rails.rb
haml-3.1.0.alpha.30 test/linked_rails.rb
haml-3.1.0.alpha.28 test/linked_rails.rb
haml-3.1.0.alpha.27 test/linked_rails.rb
haml-3.1.0.alpha.26 test/linked_rails.rb
haml-3.1.0.alpha.23 test/linked_rails.rb
haml-3.1.0.alpha.22 test/linked_rails.rb
haml-3.0.22 test/linked_rails.rb
haml-3.1.0.alpha.19 test/linked_rails.rb
haml-3.1.0.alpha.18 test/linked_rails.rb
haml-3.1.0.alpha.17 test/linked_rails.rb
haml-3.1.0.alpha.14 test/linked_rails.rb
haml-3.1.0.alpha.12 test/linked_rails.rb
haml-3.1.0.alpha.10 test/linked_rails.rb
haml-3.0.21 test/linked_rails.rb
haml-3.1.0.alpha.9 test/linked_rails.rb
haml-3.1.0.alpha.5 test/linked_rails.rb