1
0
Fork 0
mirror of https://github.com/sinatra/sinatra synced 2023-03-27 23:18:01 -04:00

Merge pull request #372 from timfel/patch/revert-less

therubyracer is very unstable/crashes often on rbx,jruby and maglev - rev
This commit is contained in:
Konstantin Haase 2011-10-06 21:49:35 -07:00
commit 33c64d0d01
2 changed files with 9 additions and 4 deletions

View file

@ -29,7 +29,6 @@ gem 'haml', '>= 3.0'
gem 'sass'
gem 'builder'
gem 'erubis'
gem 'less', '~> 2.0'
gem 'liquid'
gem 'slim', '~> 1.0'
gem 'temple', '!= 0.3.3'
@ -47,6 +46,12 @@ else
gem 'nokogiri'
end
if RUBY_ENGINE == "ruby"
gem 'less', '~> 2.0'
else
gem 'less', '~> 1.0'
end
unless RUBY_ENGINE == 'jruby' && JRUBY_VERSION < "1.6.1" && !ENV['TRAVIS']
# C extensions
gem 'rdiscount'

View file

@ -16,7 +16,7 @@ class LessTest < Test::Unit::TestCase
it 'renders inline Less strings' do
less_app { less "@white_color: #fff; #main { background-color: @white_color }" }
assert ok?
assert_body "#main {background-color: #ffffff;}"
assert_equal "#main{background-color:#ffffff;}", body.gsub(/\s/, "")
end
it 'defaults content type to css' do
@ -45,13 +45,13 @@ class LessTest < Test::Unit::TestCase
it 'renders .less files in views path' do
less_app { less :hello }
assert ok?
assert_body "#main {background-color: #ffffff;}"
assert_equal "#main{background-color:#ffffff;}", body.gsub(/\s/, "")
end
it 'ignores the layout option' do
less_app { less :hello, :layout => :layout2 }
assert ok?
assert_body "#main {background-color: #ffffff;}"
assert_equal "#main{background-color:#ffffff;}", body.gsub(/\s/, "")
end
it "raises error if template not found" do