diff --git a/jekyll.gemspec b/jekyll.gemspec index 6e2035c6..97f9b9d6 100644 --- a/jekyll.gemspec +++ b/jekyll.gemspec @@ -277,11 +277,13 @@ Gem::Specification.new do |s| test/source/_posts/2013-12-17-include-variable-filters.markdown test/source/_posts/2013-12-20-properties.text test/source/_posts/es/2008-11-21-nested.textile + test/source/_sass/_grid.scss test/source/about.html test/source/category/_posts/2008-9-23-categories.textile test/source/contacts.html test/source/contacts/bar.html test/source/contacts/index.html + test/source/css/main.scss test/source/css/screen.css test/source/deal.with.dots.html test/source/foo/_posts/bar/2008-12-12-topical-post.textile diff --git a/test/source/_sass/_grid.scss b/test/source/_sass/_grid.scss new file mode 100644 index 00000000..606aaf29 --- /dev/null +++ b/test/source/_sass/_grid.scss @@ -0,0 +1 @@ +.half { width: 50%; } \ No newline at end of file diff --git a/test/source/css/main.scss b/test/source/css/main.scss new file mode 100644 index 00000000..abc9ecd8 --- /dev/null +++ b/test/source/css/main.scss @@ -0,0 +1,4 @@ +--- +--- + +@import "grid"; \ No newline at end of file diff --git a/test/test_filters.rb b/test/test_filters.rb index 7f71c41b..d3f857a8 100644 --- a/test/test_filters.rb +++ b/test/test_filters.rb @@ -131,7 +131,7 @@ class TestFilters < Test::Unit::TestCase assert_equal 2, g["items"].size when "" assert g["items"].is_a?(Array), "The list of grouped items for '' is not an Array." - assert_equal 6, g["items"].size + assert_equal 8, g["items"].size end end end diff --git a/test/test_sass.rb b/test/test_sass.rb index d13fbcfe..0daa4f1d 100644 --- a/test/test_sass.rb +++ b/test/test_sass.rb @@ -104,4 +104,19 @@ CSS assert_equal css_output, converter.convert(scss_content) end end + + 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 + end end diff --git a/test/test_site.rb b/test/test_site.rb index b1cf01d1..eace35f7 100644 --- a/test/test_site.rb +++ b/test/test_site.rb @@ -157,7 +157,8 @@ class TestSite < Test::Unit::TestCase should "sort pages alphabetically" do stub.proxy(Dir).entries { |entries| entries.reverse } @site.process - sorted_pages = %w(.htaccess about.html bar.html coffeescript.coffee contacts.html deal.with.dots.html foo.md index.html index.html properties.html sitemap.xml symlinked-file) + # files in symlinked directories may appear twice + sorted_pages = %w(.htaccess about.html bar.html coffeescript.coffee contacts.html deal.with.dots.html foo.md index.html index.html main.scss main.scss properties.html sitemap.xml symlinked-file) assert_equal sorted_pages, @site.pages.map(&:name) end