Merge pull request #2009 from penibelst/test-sass-include
This commit is contained in:
commit
d43341fab0
|
@ -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
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
.half { width: 50%; }
|
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
---
|
||||
|
||||
@import "grid";
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue