Skip to content

Commit

Permalink
adjust tests for new version of coffescript
Browse files Browse the repository at this point in the history
  • Loading branch information
rkh committed Dec 25, 2010
1 parent e2940bc commit 849b6d2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/coffee_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def coffee_app(options = {}, &block)
it 'renders inline Coffee strings' do
coffee_app { coffee "alert 'Aye!'\n" }
assert ok?
assert_equal "(function() {\n alert('Aye!');\n})();\n", body
assert_equal "(function() {\n alert('Aye!');\n}).call(this);\n", body
end

it 'defaults content type to javascript' do
Expand Down Expand Up @@ -45,13 +45,13 @@ def coffee_app(options = {}, &block)
it 'renders .coffee files in views path' do
coffee_app { coffee :hello }
assert ok?
assert_equal "(function() {\n alert(\"Aye!\");\n})();\n", body
assert_equal "(function() {\n alert(\"Aye!\");\n}).call(this);\n", body
end

it 'ignores the layout option' do
coffee_app { coffee :hello, :layout => :layout2 }
assert ok?
assert_equal "(function() {\n alert(\"Aye!\");\n})();\n", body
assert_equal "(function() {\n alert(\"Aye!\");\n}).call(this);\n", body
end

it "raises error if template not found" do
Expand Down

0 comments on commit 849b6d2

Please sign in to comment.