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 options[:layout] = false
render :sass, template, options, locals render :sass, template, options, locals
end end
def less(template, options={}, locals={}) def less(template, options={}, locals={})
options[:layout] = false options[:layout] = false
render :less, template, options, locals render :less, template, options, locals

View File

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