Skip to content

Commit

Permalink
Fix webmock errors in specs for ruby 2.1 and 2.2
Browse files Browse the repository at this point in the history
New versions of webmock released within the last month have adopted the
ruby 2.4 method invocation syntax of &. but the tested ruby versions do
not support it.

This commit resolves the problem by conditionally bundling either the
older version of webmock or newer versions based on the current ruby
version.
  • Loading branch information
coderjoe committed Aug 7, 2022
1 parent 9ebb375 commit 86e21aa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ group :test do
gem "rspec", ">= 3.2"
gem "rspec-mocks", ">= 3"
gem "simplecov", ">= 0.13"
gem "webmock"
gem "webmock", '~> 3.14.0' if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.4.0")
gem "webmock", '>= 3.14' if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("2.4.0")
end

gemspec

0 comments on commit 86e21aa

Please sign in to comment.