Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 722360e

Browse files
Fix flakies in bundler gem installer specs
After introducing the `simulate_version` setting, that's another call to `Bundler#Settings#[]` that gets in the middle and makes these specs fail when run in isolation.
1 parent 4e5d4d3 commit 722360e

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

bundler/spec/bundler/installer/gem_installer_spec.rb

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,7 @@
2323

2424
context "spec_settings is build option" do
2525
it "invokes install method with build_args" do
26-
allow(Bundler.settings).to receive(:[]).with(:bin)
27-
allow(Bundler.settings).to receive(:[]).with(:inline)
28-
allow(Bundler.settings).to receive(:[]).with(:forget_cli_options)
26+
allow(Bundler.settings).to receive(:[])
2927
allow(Bundler.settings).to receive(:[]).with("build.dummy").and_return("--with-dummy-config=dummy")
3028
expect(spec_source).to receive(:install).with(
3129
spec,
@@ -37,9 +35,7 @@
3735

3836
context "spec_settings is build option with spaces" do
3937
it "invokes install method with build_args" do
40-
allow(Bundler.settings).to receive(:[]).with(:bin)
41-
allow(Bundler.settings).to receive(:[]).with(:inline)
42-
allow(Bundler.settings).to receive(:[]).with(:forget_cli_options)
38+
allow(Bundler.settings).to receive(:[])
4339
allow(Bundler.settings).to receive(:[]).with("build.dummy").and_return("--with-dummy-config=dummy --with-another-dummy-config")
4440
expect(spec_source).to receive(:install).with(
4541
spec,

0 commit comments

Comments
 (0)