require 'helper'
class TestSlimWrapper < TestSlim
def setup
Slim::Sections.set_default_options(:dictionary => 'ViewEnv.new')
end
def teardown
Slim::Sections.set_default_options(:dictionary => 'self')
end
def test_sections
source = %q{
p
- person
.name = name
}
assert_html '
Joe
Jack
', source, :sections => true
end
def test_with_array
source = %q{
ul
- people_with_locations
li = name
li = city
}
assert_html '- Andy
- Atlanta
- Fred
- Melbourne
- Daniel
- Karlsruhe
', source, :sections => true
end
def test_method
source = %q{
a href=output_number Link
}
assert_html 'Link', source, :sections => true
end
end