forked from Compass/compass
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest_helper.rb
37 lines (26 loc) · 852 Bytes
/
test_helper.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
need_gems = false
lib_dir = File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib'))
$:.unshift(lib_dir) unless $:.include?(lib_dir)
test_dir = File.dirname(__FILE__)
$:.unshift(test_dir) unless $:.include?(test_dir)
# 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'
require 'sass'
else
need_gems = true
end
require 'rubygems' if need_gems
require 'compass'
require 'test/unit'
%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
end