2008-08-23 17:00:46 +00:00
|
|
|
need_gems = false
|
|
|
|
|
2009-09-03 02:47:01 +00:00
|
|
|
lib_dir = File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib'))
|
|
|
|
$:.unshift(lib_dir) unless $:.include?(lib_dir)
|
2009-10-16 07:57:34 +00:00
|
|
|
test_dir = File.dirname(__FILE__)
|
|
|
|
$:.unshift(test_dir) unless $:.include?(test_dir)
|
2009-09-03 02:47:01 +00:00
|
|
|
|
2008-08-23 17:00:46 +00:00
|
|
|
# allows testing with edge Haml by creating a test/haml symlink
|
|
|
|
linked_haml = File.dirname(__FILE__) + '/haml'
|
|
|
|
|
|
|
|
if File.exists?(linked_haml) && !$:.include?(linked_haml + '/lib')
|
|
|
|
puts "[ using linked Haml ]"
|
|
|
|
$:.unshift linked_haml + '/lib'
|
2009-05-07 17:24:32 +00:00
|
|
|
require 'sass'
|
2008-08-23 17:00:46 +00:00
|
|
|
else
|
|
|
|
need_gems = true
|
|
|
|
end
|
|
|
|
|
|
|
|
require 'rubygems' if need_gems
|
|
|
|
|
2009-05-19 18:27:29 +00:00
|
|
|
require 'compass'
|
2008-08-23 17:00:46 +00:00
|
|
|
|
|
|
|
require 'test/unit'
|
2011-05-16 15:30:14 +00:00
|
|
|
require 'mocha'
|
2011-04-28 03:18:52 +00:00
|
|
|
|
|
|
|
%w(command_line diff io rails test_case).each do |helper|
|
|
|
|
require "helpers/#{helper}"
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
class Test::Unit::TestCase
|
|
|
|
include Compass::Diff
|
|
|
|
include Compass::TestCaseHelper
|
|
|
|
include Compass::IoHelper
|
|
|
|
extend Compass::TestCaseHelper::ClassMethods
|
|
|
|
|
2011-05-16 15:30:14 +00:00
|
|
|
end
|