test/helper: fix flaky plugin path test by initializing Configuration::DEFAULTS at start of tests

If we do a Dir.chdir before Configuration::DEFAULTS is initialized, then its source and destination values will not be what we expect.
We expect that Dir.pwd should stay as the root of the repo but there are some errant calls to Dir.chdir without a block that are still
not yet cleaned up.
This commit is contained in:
Parker Moore 2017-01-16 16:25:09 -05:00
parent 07d161c2ce
commit 567a7952dd
No known key found for this signature in database
GPG Key ID: 193CDEBA72063C58
1 changed files with 5 additions and 0 deletions

View File

@ -30,6 +30,11 @@ require "minitest/profile"
require "rspec/mocks"
require_relative "../lib/jekyll.rb"
# The default "source" and "destination" values depend on Dir.pwd,
# which changes when we use Dir.chdir without a block. Initialize
# it here so it has Dir.pwd = root of this repo.
Jekyll::Configuration::DEFAULTS
Jekyll.logger = Logger.new(StringIO.new)
unless jruby?