Skip to content

Commit

Permalink
bundler: Fix flaky specs by checking major version unlock only
Browse files Browse the repository at this point in the history
These tests run bundler to check the latest version, but any time this
is updated the test would start to fail
(#3235). This change
makes sure that we only check that the version was unlocked by checking
the major version only. If a v3 is ever released this will fail again,
but at least it buys us a bit more time.
  • Loading branch information
jurre committed Mar 15, 2021
1 parent c6eae14 commit f74040b
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,10 @@
let(:current_version) { "1.4.0" }

let(:dependency_files) { project_dependency_files("bundler1/git_source_circular") }
its([:version]) { is_expected.to eq(Gem::Version.new("2.2.0")) }

it "unlocks the version" do
expect(resolver.latest_resolvable_version_details[:version].canonical_segments.first).to eq(2)
end
end

context "with a ruby exec command that fails" do
Expand Down Expand Up @@ -339,8 +342,7 @@
end

it "unlocks the latest version" do
expect(resolver.latest_resolvable_version_details[:version]).
to eq(Gem::Version.new("2.2.0"))
expect(resolver.latest_resolvable_version_details[:version].canonical_segments.first).to eq(2)
end

context "with an upper bound that is lower than the current req" do
Expand Down

0 comments on commit f74040b

Please sign in to comment.