Look for plugins under the source directory by default

This commit is contained in:
Matt Rogers
2013-01-10 21:24:28 -06:00
parent f3f181484d
commit 92eb926bf8
2 changed files with 13 additions and 4 deletions

View File

@@ -7,9 +7,9 @@ class TestSite < Test::Unit::TestCase
assert_equal [File.join(Dir.pwd, '_plugins')], site.plugins
end
should "have an array for plugins if passed as a string" do
site = Site.new(Jekyll::DEFAULTS.merge({'plugins' => '/tmp/plugins'}))
assert_equal ['/tmp/plugins'], site.plugins
should "look for plugins under the site directory by default" do
site = Site.new(Jekyll::DEFAULTS.merge({'source' => source_dir}))
assert_equal [File.join(source_dir, '_plugins')], site.plugins
end
should "have an array for plugins if passed as an array" do
@@ -26,6 +26,7 @@ class TestSite < Test::Unit::TestCase
site = Site.new(Jekyll::DEFAULTS.merge({'plugins' => nil}))
assert_equal [], site.plugins
end
end
context "creating sites" do
setup do