test/slim/test_embedded_engines.rb in slim-1.0.2 vs test/slim/test_embedded_engines.rb in slim-1.0.3
- old
+ new
@@ -1,28 +1,8 @@
require 'helper'
-begin
- require('creole/template')
-rescue LoadError
-end
class TestSlimEmbeddedEngines < TestSlim
- def test_render_with_haml
- source = %q{
-p
- - text = 'haml'
- haml:
- - passed_from_haml = 'from haml'
- %b Hello from #{text.upcase}!
- Second Line!
- - if true
- = true
- = passed_from_haml
-}
-
- assert_html "<p><b>Hello from HAML!</b>\nSecond Line!\ntrue\nfrom haml</p>", source
- end
-
def test_render_with_erb
source = %q{
p
- text = 'before erb block'
erb:
@@ -44,11 +24,11 @@
#{1+2}
* one
* two
}
- assert_html "<h1>Header</h1>\n\n<p>Hello from Markdown!</p>\n\n<p>3</p>\n\n<ul>\n<li>one</li>\n<li>two</li>\n</ul>\n\n", source
+ assert_html "<h1 id=\"header\">Header</h1>\n<p>Hello from Markdown!</p>\n\n<p>3</p>\n\n<ul>\n <li>one</li>\n <li>two</li>\n</ul>\n", source
end
def test_render_with_creole
source = %q{
creole:
@@ -56,10 +36,19 @@
== head2
}
assert_html "<h1>head1</h1><h2>head2</h2>", source
end
+ def test_render_with_wiki
+ source = %q{
+wiki:
+ = head1
+ == head2
+}
+ assert_html "<h1>head1</h1><h2>head2</h2>", source
+ end
+
def test_render_with_javascript
# Keep the trailing space behind "javascript: "!
source = %q{
javascript:
$(function() {});
@@ -87,19 +76,9 @@
variable = 1 +
2
= variable
}
assert_html '3', source
- end
-
- def test_render_with_liquid
- source = %q{
-p
- - text = 'before liquid block'
- liquid:
- <span>{{text}}</span>
-}
- assert_html "<p><span>before liquid block</span></p>", source
end
def test_render_with_scss
source = %q{
scss: