Files
jekyll/test/test_sass.rb
Parker Moore f2f2ebfa4f Register subclasses of subclasses of Jekyll::Plugin
The Sass and SCSS converters are practically the same – only different in
the input syntax and file extension. As such, we've created
`Jekyll::Converters::Scss` which is a subclass of `Jekyll::Converter`, and
`Jekyll::Converters::Sass` which is a subclass of
`Jekyll::Converters::Scss`. When `Site#instantiate_classes` is called on
`Jekyll::Converter`, it only instantiates the `Scss` converter, not the
`Sass` converter. This change fixes that.

Fixes #2334.
2014-05-07 14:59:08 -04:00

27 lines
767 B
Ruby

require 'helper'
class TestSass < Test::Unit::TestCase
context "importing partials" do
setup do
@site = Jekyll::Site.new(Jekyll.configuration({
"source" => source_dir,
"destination" => dest_dir
}))
@site.process
@test_css_file = dest_dir("css/main.css")
end
should "import SCSS partial" do
assert_equal ".half {\n width: 50%; }\n", File.read(@test_css_file)
end
should "register the SCSS converter" do
assert !!@site.getConverterImpl(Jekyll::Converters::Scss), "SCSS converter implementation should exist."
end
should "register the Sass converter" do
assert !!@site.getConverterImpl(Jekyll::Converters::Sass), "Sass converter implementation should exist."
end
end
end