Sha256: c318f96b7e1249d0526c0ee09886027de491ccc267e70a698be0691ec8fc6c86

Contents?: true

Size: 682 Bytes

Versions: 3

Compression:

Stored size: 682 Bytes

Contents

require 'helper'
require 'slim/logic_less'

class TestSlimWrapper < TestSlim
  def test_sections
    source = %q{
p
 - person
  .name = name
}
    assert_html '<p><div class="name">Joe</div><div class="name">Jack</div></p>', source, :dictionary => 'ViewEnv.new'
  end

  def test_with_array
    source = %q{
ul
 - people_with_locations
  li = name
  li = city
}
    assert_html '<ul><li>Andy</li><li>Atlanta</li><li>Fred</li><li>Melbourne</li><li>Daniel</li><li>Karlsruhe</li></ul>', source, :dictionary => 'ViewEnv.new'
  end

  def test_method
    source = %q{
a href=output_number Link
}
    assert_html '<a href="1337">Link</a>', source, :dictionary => 'ViewEnv.new'
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
slim-1.3.4 test/logic_less/test_wrapper.rb
slim-1.3.3 test/logic_less/test_wrapper.rb
slim-1.3.2 test/logic_less/test_wrapper.rb