100% RCov.
git-svn-id: svn://hamptoncatlin.com/haml/trunk@352 7063305b-7217-0410-af8c-cdc13e5119b9
This commit is contained in:
parent
f4209db126
commit
cae1979804
|
@ -37,11 +37,24 @@ class SassPluginTest < Test::Unit::TestCase
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_exception_handling
|
def test_exception_handling
|
||||||
|
File.delete(tempfile_loc('bork'))
|
||||||
|
Sass::Plugin.update_stylesheets
|
||||||
File.open(tempfile_loc('bork')) do |file|
|
File.open(tempfile_loc('bork')) do |file|
|
||||||
assert_equal("/*\nSass::SyntaxError: Undefined constant: \"!bork\"\non line 2 of #{File.dirname(__FILE__) + '/templates/bork.sass'}\n\n1: bork\n2: :bork= !bork", file.read.split("\n")[0...6].join("\n"))
|
assert_equal("/*\nSass::SyntaxError: Undefined constant: \"!bork\"\non line 2 of #{File.dirname(__FILE__) + '/templates/bork.sass'}\n\n1: bork\n2: :bork= !bork", file.read.split("\n")[0...6].join("\n"))
|
||||||
end
|
end
|
||||||
File.delete(tempfile_loc('bork'))
|
File.delete(tempfile_loc('bork'))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_production_exception_handling
|
||||||
|
Sass.const_set('RAILS_ENV', 'production')
|
||||||
|
|
||||||
|
File.delete(tempfile_loc('bork'))
|
||||||
|
Sass::Plugin.update_stylesheets
|
||||||
|
assert_equal("/* Internal stylesheet error */", File.read(tempfile_loc('bork')))
|
||||||
|
File.delete(tempfile_loc('bork'))
|
||||||
|
|
||||||
|
Sass::Plugin.const_set('RAILS_ENV', 'testing')
|
||||||
|
end
|
||||||
|
|
||||||
def test_controller_process
|
def test_controller_process
|
||||||
File.delete(tempfile_loc('basic'))
|
File.delete(tempfile_loc('basic'))
|
||||||
|
|
Loading…
Reference in New Issue