fix whitespace errors
This commit is contained in:
parent
621bfcbd6a
commit
ceac46f0bc
|
@ -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
|
||||
|
|
|
@ -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 }
|
||||
|
|
Loading…
Reference in New Issue