Skip to content

Commit

Permalink
[rubygems/rubygems] Relax matching pattern for rake version
Browse files Browse the repository at this point in the history
  • Loading branch information
hsbt committed Oct 30, 2023
1 parent 8563a14 commit a18c9d8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions spec/bundler/commands/add_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -147,23 +147,23 @@
it "adds dependency with specified github source" do
bundle "add rake --github=ruby/rake"

expect(bundled_app_gemfile.read).to match(%r{gem "rake", "~> 13\.0", :github => "ruby\/rake"})
expect(bundled_app_gemfile.read).to match(%r{gem "rake", "~> 13\.\d+", :github => "ruby\/rake"})
end
end

describe "with --github and --branch" do
it "adds dependency with specified github source and branch" do
bundle "add rake --github=ruby/rake --branch=master"

expect(bundled_app_gemfile.read).to match(%r{gem "rake", "~> 13\.0", :github => "ruby\/rake", :branch => "master"})
expect(bundled_app_gemfile.read).to match(%r{gem "rake", "~> 13\.\d+", :github => "ruby\/rake", :branch => "master"})
end
end

describe "with --github and --ref" do
it "adds dependency with specified github source and ref" do
bundle "add rake --github=ruby/rake --ref=5c60da8"

expect(bundled_app_gemfile.read).to match(%r{gem "rake", "~> 13\.0", :github => "ruby\/rake", :ref => "5c60da8"})
expect(bundled_app_gemfile.read).to match(%r{gem "rake", "~> 13\.\d+", :github => "ruby\/rake", :ref => "5c60da8"})
end
end

Expand Down

0 comments on commit a18c9d8

Please sign in to comment.