Skip to content

Commit 86e21aa

Browse files
committed
Fix webmock errors in specs for ruby 2.1 and 2.2
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.
1 parent 9ebb375 commit 86e21aa

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Gemfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ group :test do
1313
gem "rspec", ">= 3.2"
1414
gem "rspec-mocks", ">= 3"
1515
gem "simplecov", ">= 0.13"
16-
gem "webmock"
16+
gem "webmock", '~> 3.14.0' if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.4.0")
17+
gem "webmock", '>= 3.14' if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("2.4.0")
1718
end
1819

1920
gemspec

0 commit comments

Comments
 (0)