mirror of
https://github.com/jekyll/jekyll.git
synced 2026-01-31 09:48:30 -05:00
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.
27 lines
767 B
Ruby
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
|