Move layout tests from site to its own file
This commit is contained in:
parent
70ecef0094
commit
facf115c04
|
@ -0,0 +1,17 @@
|
|||
require 'helper'
|
||||
|
||||
class TestLayoutReader < Test::Unit::TestCase
|
||||
context "reading layouts" do
|
||||
setup do
|
||||
stub(Jekyll).configuration do
|
||||
Jekyll::Configuration::DEFAULTS.merge({'source' => source_dir, 'destination' => dest_dir})
|
||||
end
|
||||
@site = Site.new(Jekyll.configuration)
|
||||
end
|
||||
|
||||
should "read layouts" do
|
||||
layouts = LayoutReader.new(@site).read
|
||||
assert_equal ["default", "simple", "post/simple"].sort, layouts.keys.sort
|
||||
end
|
||||
end
|
||||
end
|
|
@ -161,11 +161,6 @@ class TestSite < Test::Unit::TestCase
|
|||
assert_equal sorted_pages, @site.pages.map(&:name)
|
||||
end
|
||||
|
||||
should "read layouts" do
|
||||
@site.read_layouts
|
||||
assert_equal ["default", "simple", "post/simple"].sort, @site.layouts.keys.sort
|
||||
end
|
||||
|
||||
should "read posts" do
|
||||
@site.read_posts('')
|
||||
posts = Dir[source_dir('_posts', '**', '*')]
|
||||
|
|
Loading…
Reference in New Issue