1
0
Fork 0
mirror of https://github.com/haml/haml.git synced 2022-11-09 12:33:31 -05:00

Pass all hamlit specs

This commit is contained in:
Takashi Kokubun 2015-10-29 00:22:11 +09:00
parent 2d2b91738c
commit 27009622d6
3 changed files with 16 additions and 2 deletions

View file

@ -10,6 +10,7 @@ require 'hamlit/filters/markdown'
require 'hamlit/filters/plain'
require 'hamlit/filters/preserve'
require 'hamlit/filters/ruby'
require 'hamlit/filters/sass'
require 'hamlit/filters/scss'
module Hamlit
@ -37,6 +38,7 @@ module Hamlit
register :plain, Plain
register :preserve, Preserve
register :ruby, Ruby
register :sass, Sass
register :scss, Scss
def initialize(options = {})

View file

@ -0,0 +1,14 @@
module Hamlit
class Filters
class Sass < TiltBase
def compile(node)
require 'tilt/sass'
temple = [:multi]
temple << [:static, "<style>\n".freeze]
temple << compile_with_tilt(node, 'sass', indent_width: 2)
temple << [:static, "</style>".freeze]
temple
end
end
end
end

View file

@ -3,7 +3,6 @@ describe Hamlit::Filters do
describe '#compile' do
it 'renders sass filter' do
skip
assert_render(<<-HAML, <<-HTML)
:sass
.users_controller
@ -20,7 +19,6 @@ describe Hamlit::Filters do
end
it 'renders sass filter with string interpolation' do
skip
assert_render(<<-'HAML', <<-HTML)
:sass
.users_controller