fix whitespace errors

This commit is contained in:
Simon Rozet 2010-03-01 16:07:57 -08:00
parent 621bfcbd6a
commit ceac46f0bc
2 changed files with 5 additions and 5 deletions

View File

@ -304,7 +304,7 @@ module Sinatra
options[:layout] = false
render :sass, template, options, locals
end
def less(template, options={}, locals={})
options[:layout] = false
render :less, template, options, locals

View File

@ -9,25 +9,25 @@ class LessTest < Test::Unit::TestCase
}
get '/'
end
it 'renders inline Less strings' do
less_app { less "@white_color: #fff; #main { background-color: @white_color }"}
assert ok?
assert_equal "#main { background-color: #ffffff; }\n", body
end
it 'renders .less files in views path' do
less_app { less :hello }
assert ok?
assert_equal "#main { background-color: #ffffff; }\n", body
end
it 'ignores the layout option' do
less_app { less :hello, :layout => :layout2 }
assert ok?
assert_equal "#main { background-color: #ffffff; }\n", body
end
it "raises error if template not found" do
mock_app {
get('/') { less :no_such_template }