2008-08-30 02:40:59 +02:00
|
|
|
lib_dir = File.dirname(__FILE__) + '/../lib'
|
2008-10-27 10:19:52 -07:00
|
|
|
require File.dirname(__FILE__) + '/linked_rails'
|
2008-03-05 22:03:07 +01:00
|
|
|
|
|
|
|
require 'test/unit'
|
2008-08-30 02:40:59 +02:00
|
|
|
$:.unshift lib_dir unless $:.include?(lib_dir)
|
|
|
|
require 'haml'
|
|
|
|
require 'sass'
|
2008-09-22 00:24:18 +02:00
|
|
|
|
|
|
|
# required because of Sass::Plugin
|
2008-09-22 09:20:51 +02:00
|
|
|
unless defined? RAILS_ROOT
|
|
|
|
RAILS_ROOT = '.'
|
|
|
|
MERB_ENV = RAILS_ENV = 'testing'
|
2008-10-27 10:19:52 -07:00
|
|
|
end
|
2008-12-25 14:17:12 -08:00
|
|
|
|
|
|
|
class Test::Unit::TestCase
|
|
|
|
def munge_filename(opts)
|
|
|
|
return if opts[:filename]
|
2009-02-06 02:41:47 -08:00
|
|
|
test_name = caller[1].gsub(/^.*`(?:\w+ )*(\w+)'.*$/, '\1')
|
2008-12-25 14:17:12 -08:00
|
|
|
opts[:filename] = "#{test_name}_inline.sass"
|
|
|
|
end
|
|
|
|
end
|