Permalink
Browse files

Revert "Merge pull request #124 from hannesg/coffee_script_test_fix"

This reverts commit b9dc4e5, reversing
changes made to 77dfce2.
  • Loading branch information...
1 parent b9dc4e5 commit 37834111ee65971bdaf889baa8d30b35aadf1987 @josh josh committed Jan 10, 2012
Showing with 6 additions and 6 deletions.
  1. +6 −6 test/tilt_coffeescripttemplate_test.rb
@@ -23,16 +23,15 @@ class CoffeeScriptTemplateTest < Test::Unit::TestCase
str = "puts 'Hello, World!'\n"
template = Tilt::CoffeeScriptTemplate.new(:bare => true) { str }
- assert_equal "\nputs('Hello, World!');\n", template.render
+ assert_equal "puts('Hello, World!');", template.render
template2 = Tilt::CoffeeScriptTemplate.new(:no_wrap => true) { str}
- assert_equal "\nputs('Hello, World!');\n", template.render
+ assert_equal "puts('Hello, World!');", template.render
end
context "disabling coffee-script wrapper globally" do
setup do
@bare = Tilt::CoffeeScriptTemplate.default_bare
- Tilt::CoffeeScriptTemplate.default_bare = true
end
teardown do
@@ -41,17 +40,18 @@ class CoffeeScriptTemplateTest < Test::Unit::TestCase
test "no options" do
template = Tilt::CoffeeScriptTemplate.new { |t| "puts 'Hello, World!'\n" }
- assert_equal "\nputs('Hello, World!');\n", template.render
+ assert_match "puts('Hello, World!');", template.render
+ assert_match "(function() {", template.render
end
test "overridden by :bare" do
template = Tilt::CoffeeScriptTemplate.new(:bare => false) { "puts 'Hello, World!'\n" }
- assert_not_equal "\nputs('Hello, World!');\n", template.render
+ assert_not_equal "puts('Hello, World!');", template.render
end
test "overridden by :no_wrap" do
template = Tilt::CoffeeScriptTemplate.new(:no_wrap => false) { "puts 'Hello, World!'\n" }
- assert_not_equal "\nputs('Hello, World!');\n", template.render
+ assert_not_equal "puts('Hello, World!');", template.render
end
end
end

0 comments on commit 3783411

Please sign in to comment.