Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

21 lines (16 sloc) 0.552 kB
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
end
rescue LoadError => boom
warn "Tilt::LessTemplate (disabled)\n"
end
Jump to Line
Something went wrong with that request. Please try again.