Sha256: 20c0a573b14cad0d3bc0f6cd5ccbdae62773189ca0d7115f47ad3957699065ae
Contents?: true
Size: 806 Bytes
Versions: 4
Compression:
Stored size: 806 Bytes
Contents
require 'contest' require 'tilt' begin require 'less' class LessTemplateTest < Test::Unit::TestCase test "is registered for '.less' files" do assert_equal Tilt::LessTemplate, Tilt['test.less'] end test "compiles and evaluates the template on #render" do template = Tilt::LessTemplate.new { |t| ".bg { background-color: #0000ff; } \n#main\n { .bg; }\n" } assert_equal ".bg, #main { background-color: #0000ff; }\n", template.render end test "can be rendered more than once" do template = Tilt::LessTemplate.new { |t| ".bg { background-color: #0000ff; } \n#main\n { .bg; }\n" } 3.times { assert_equal ".bg, #main { background-color: #0000ff; }\n", template.render } end end rescue LoadError => boom warn "Tilt::LessTemplate (disabled)\n" end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
tilt-1.3.2 | test/tilt_lesstemplate_test.rb |
tilt-1.3.1 | test/tilt_lesstemplate_test.rb |
tilt-1.3 | test/tilt_lesstemplate_test.rb |
tilt-1.2.2 | test/tilt_lesstemplate_test.rb |