Add test to ensure plugins are executed in order of priority.
This commit is contained in:
parent
b49bba9351
commit
7425b2c32e
|
@ -0,0 +1,8 @@
|
|||
module Jekyll
|
||||
class Dummy < Generator
|
||||
priority :high
|
||||
|
||||
def generate(site)
|
||||
end
|
||||
end
|
||||
end
|
|
@ -124,6 +124,11 @@ class TestSite < Test::Unit::TestCase
|
|||
assert_equal mtime3, mtime4 # no modifications, so must be the same
|
||||
end
|
||||
|
||||
should "setup plugins in priority order" do
|
||||
assert_equal @site.converters.sort_by(&:class).map{|c|c.class.priority}, @site.converters.map{|c|c.class.priority}
|
||||
assert_equal @site.generators.sort_by(&:class).map{|g|g.class.priority}, @site.generators.map{|g|g.class.priority}
|
||||
end
|
||||
|
||||
should "read layouts" do
|
||||
@site.read_layouts
|
||||
assert_equal ["default", "simple"].sort, @site.layouts.keys.sort
|
||||
|
|
Loading…
Reference in New Issue