adjust tests for new version of coffescript
This commit is contained in:
parent
e75d3c0c03
commit
5ca92e10f4
|
@ -16,7 +16,7 @@ class CoffeeTest < Test::Unit::TestCase
|
||||||
it 'renders inline Coffee strings' do
|
it 'renders inline Coffee strings' do
|
||||||
coffee_app { coffee "alert 'Aye!'\n" }
|
coffee_app { coffee "alert 'Aye!'\n" }
|
||||||
assert ok?
|
assert ok?
|
||||||
assert_equal "(function() {\n alert('Aye!');\n})();\n", body
|
assert_equal "(function() {\n alert('Aye!');\n}).call(this);\n", body
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'defaults content type to javascript' do
|
it 'defaults content type to javascript' do
|
||||||
|
@ -45,13 +45,13 @@ class CoffeeTest < Test::Unit::TestCase
|
||||||
it 'renders .coffee files in views path' do
|
it 'renders .coffee files in views path' do
|
||||||
coffee_app { coffee :hello }
|
coffee_app { coffee :hello }
|
||||||
assert ok?
|
assert ok?
|
||||||
assert_equal "(function() {\n alert(\"Aye!\");\n})();\n", body
|
assert_equal "(function() {\n alert(\"Aye!\");\n}).call(this);\n", body
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'ignores the layout option' do
|
it 'ignores the layout option' do
|
||||||
coffee_app { coffee :hello, :layout => :layout2 }
|
coffee_app { coffee :hello, :layout => :layout2 }
|
||||||
assert ok?
|
assert ok?
|
||||||
assert_equal "(function() {\n alert(\"Aye!\");\n})();\n", body
|
assert_equal "(function() {\n alert(\"Aye!\");\n}).call(this);\n", body
|
||||||
end
|
end
|
||||||
|
|
||||||
it "raises error if template not found" do
|
it "raises error if template not found" do
|
||||||
|
|
Loading…
Reference in New Issue