Test site.static_files
This commit is contained in:
parent
949aa3fc32
commit
9659cfe876
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
---
|
||||
|
||||
{% for file in site.static_files %}
|
||||
- {{ file.path }} last edited at {{ file.modified_time }}
|
||||
{% endfor %}
|
|
@ -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 9, g["items"].size
|
||||
assert_equal 10, g["items"].size
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -44,6 +44,10 @@ class TestGeneratedSite < Test::Unit::TestCase
|
|||
assert File.exists?(dest_dir('/about/index.html'))
|
||||
assert File.exists?(dest_dir('/contacts.html'))
|
||||
end
|
||||
|
||||
should "print a nice list of static files" do
|
||||
assert_equal "", File.read(dest_dir('static_files.html'))
|
||||
end
|
||||
end
|
||||
|
||||
context "generating limited posts" do
|
||||
|
|
|
@ -158,7 +158,24 @@ class TestSite < Test::Unit::TestCase
|
|||
stub.proxy(Dir).entries { |entries| entries.reverse }
|
||||
@site.process
|
||||
# files in symlinked directories may appear twice
|
||||
sorted_pages = %w(.htaccess about.html bar.html coffeescript.coffee contacts.html deal.with.dots.html exploit.md foo.md index.html index.html main.scss main.scss properties.html sitemap.xml symlinked-file)
|
||||
sorted_pages = %w(
|
||||
.htaccess
|
||||
about.html
|
||||
bar.html
|
||||
coffeescript.coffee
|
||||
contacts.html
|
||||
deal.with.dots.html
|
||||
exploit.md
|
||||
foo.md
|
||||
index.html
|
||||
index.html
|
||||
main.scss
|
||||
main.scss
|
||||
properties.html
|
||||
sitemap.xml
|
||||
static_files.html
|
||||
symlinked-fil
|
||||
)
|
||||
assert_equal sorted_pages, @site.pages.map(&:name)
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue