2008-08-29 20:40:59 -04:00
|
|
|
lib_dir = File.dirname(__FILE__) + '/../lib'
|
2008-03-05 16:03:07 -05:00
|
|
|
# allows testing with edge Rails by creating a test/rails symlink
|
2008-06-08 12:54:36 -04:00
|
|
|
linked_rails = File.dirname(__FILE__) + '/rails'
|
2008-03-05 16:03:07 -05:00
|
|
|
|
2008-06-08 12:54:36 -04:00
|
|
|
if File.exists?(linked_rails) && !$:.include?(linked_rails + '/activesupport/lib')
|
2008-03-05 22:33:22 -05:00
|
|
|
puts "[ using linked Rails ]"
|
|
|
|
$:.unshift linked_rails + '/activesupport/lib'
|
|
|
|
$:.unshift linked_rails + '/actionpack/lib'
|
2008-03-05 16:03:07 -05:00
|
|
|
else
|
|
|
|
require 'rubygems'
|
|
|
|
end
|
|
|
|
require 'action_controller'
|
|
|
|
require 'action_view'
|
|
|
|
|
|
|
|
require 'test/unit'
|
2008-08-29 20:40:59 -04:00
|
|
|
$:.unshift lib_dir unless $:.include?(lib_dir)
|
|
|
|
require 'haml'
|
|
|
|
require 'sass'
|
2008-09-21 18:24:18 -04:00
|
|
|
|
|
|
|
# required because of Sass::Plugin
|
2008-09-22 03:20:51 -04:00
|
|
|
unless defined? RAILS_ROOT
|
|
|
|
RAILS_ROOT = '.'
|
|
|
|
MERB_ENV = RAILS_ENV = 'testing'
|
|
|
|
end
|