Skip to content

Commit a261a3d

Browse files
committed
(maint) fix logic for choosing rspec version
Depending on the ruby version, we either need 3.1.7 to support ruby 1.8, but since (at least) ruby 2.2 a newer version of rspec is required.
1 parent 23672ca commit a261a3d

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

Gemfile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,12 @@ def location_for(place, fake_version = nil)
1111
end
1212

1313
group :development, :unit_tests do
14-
# rspec must be v2 for ruby 1.8.7
15-
if RUBY_VERSION >= '1.8.7' and RUBY_VERSION < '1.9'
16-
gem 'rspec', '~> 2.0'
14+
# rspec-core 3.1.7 is the last version to support ruby 1.8
15+
if RUBY_VERSION < '1.9'
16+
gem 'rspec-core', '3.1.7'
1717
else
18-
gem 'rspec-core', '3.1.7', :require => false
18+
# newer version required to avoid BKR-537
19+
gem 'rspec-core', '>= 3.4'
1920
end
2021

2122
gem 'puppetlabs_spec_helper', :require => false

0 commit comments

Comments
 (0)