diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2020-01-04 06:40:59 +0100 |
---|---|---|
committer | David RodrÃguez <deivid.rodriguez@riseup.net> | 2020-01-04 15:31:45 +0100 |
commit | 88f4ecd5b4f9ded53a81109752ace0c68571de02 (patch) | |
tree | 568e60134a6af4f7d0550520af8512884de44385 | |
parent | e70d0f3d02c8c084b61969e71d1fa28a15a6d0ca (diff) | |
download | bundler-88f4ecd5b4f9ded53a81109752ace0c68571de02.tar.gz |
Fix flaky test failuresfix_windows_flakies
The Gemfile was not being removed after another test, so it `in_bundle?`
would resolve to it again even if `BUNDLE_GEMFILE` was unset.
-rw-r--r-- | spec/bundler/shared_helpers_spec.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/spec/bundler/shared_helpers_spec.rb b/spec/bundler/shared_helpers_spec.rb index 4530a9a5cd..5c91cb7bd1 100644 --- a/spec/bundler/shared_helpers_spec.rb +++ b/spec/bundler/shared_helpers_spec.rb @@ -109,7 +109,8 @@ RSpec.describe Bundler::SharedHelpers do shared_examples_for "correctly determines whether to return a Gemfile path" do context "currently in directory with a Gemfile" do - before { File.new("Gemfile", "w") } + before { FileUtils.touch("Gemfile") } + after { FileUtils.rm("Gemfile") } it "returns path of the bundle Gemfile" do expect(subject.in_bundle?).to eq("#{bundled_app}/Gemfile") |