New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test/helper: fix flaky plugin path test by removing calls to Dir.chdir without a block #5779

Merged
merged 2 commits into from Jan 16, 2017

Conversation

Projects
None yet
3 participants
@parkr
Member

parkr commented Jan 16, 2017

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. Remove all bare Dir.chdir calls.

Failing test this fixes:

Failure:
TestSite#test_: configuring sites should have an array for plugins by default.  [/home/travis/build/jekyll/jekyll/test/test_site.rb:7]
Minitest::Assertion: --- expected
+++ actual
@@ -1 +1 @@
-["/home/travis/build/jekyll/jekyll/_plugins"]
+["/home/travis/build/jekyll/jekyll/test/source/_plugins"]

Example: https://travis-ci.org/jekyll/jekyll/jobs/192169603

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.

@parkr parkr added the tests label Jan 16, 2017

@parkr parkr changed the title from test/helper: fix flaky plugin path test by initializing Configuration::DEFAULTS at start of tests to test/helper: fix flaky plugin path test by removing calls to Dir.chdir without a block Jan 16, 2017

Remove calls to Dir.chdir without a block.
This removes the necessity to initialize Jekyll::Configuration::DEFAULTS manually.

@parkr parkr requested a review from pathawks Jan 16, 2017

@parkr parkr added this to the 3.4 milestone Jan 16, 2017

@pathawks

This comment has been minimized.

Show comment
Hide comment
@pathawks

pathawks Jan 16, 2017

Member

Closes #5724

Member

pathawks commented Jan 16, 2017

Closes #5724

@pathawks pathawks referenced this pull request Jan 16, 2017

Closed

Remove broken test #5724

@pathawks

It fixes that test 🎉

@parkr

This comment has been minimized.

Show comment
Hide comment
@parkr

parkr Jan 16, 2017

Member

@jekyllbot: merge +dev

Member

parkr commented Jan 16, 2017

@jekyllbot: merge +dev

@jekyllbot jekyllbot merged commit 71dab94 into master Jan 16, 2017

1 of 2 checks passed

continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@jekyllbot jekyllbot deleted the fix-flaky-plugins-path-test branch Jan 16, 2017

jekyllbot added a commit that referenced this pull request Jan 16, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment