@@ -83,13 +83,15 @@ begin
83
83
84
84
desc '* test packaged and installed gems instead of local files'
85
85
task :installed do
86
- Dir . chdir ( __dir__ ) do
87
- sh "gem install pkg/concurrent-ruby-#{ Concurrent ::VERSION } .gem"
88
- sh "gem install pkg/concurrent-ruby-ext-#{ Concurrent ::VERSION } .gem" if Concurrent . on_cruby?
89
- sh "gem install pkg/concurrent-ruby-edge-#{ Concurrent ::EDGE_VERSION } .gem"
90
- ENV [ 'NO_PATH' ] = 'true'
91
- sh 'bundle update'
92
- sh 'bundle exec rake spec:ci'
86
+ Bundler . with_original_env do
87
+ Dir . chdir ( __dir__ ) do
88
+ sh "gem install pkg/concurrent-ruby-#{ Concurrent ::VERSION } .gem"
89
+ sh "gem install pkg/concurrent-ruby-ext-#{ Concurrent ::VERSION } .gem" if Concurrent . on_cruby?
90
+ sh "gem install pkg/concurrent-ruby-edge-#{ Concurrent ::EDGE_VERSION } .gem"
91
+ ENV [ 'NO_PATH' ] = 'true'
92
+ sh 'bundle update'
93
+ sh 'bundle exec rake spec:ci'
94
+ end
93
95
end
94
96
end
95
97
end
@@ -250,25 +252,18 @@ namespace :release do
250
252
desc '* test actual installed gems instead of cloned repository on MRI and JRuby'
251
253
task :test do
252
254
Dir . chdir ( __dir__ ) do
253
- old = ENV [ 'RBENV_VERSION' ]
254
-
255
- mri_version = `ruby -e 'puts RUBY_VERSION'` . chomp
256
- jruby_version = File . basename ( ENV [ 'CONCURRENT_JRUBY_HOME' ] )
255
+ puts "Testing with the installed gem"
257
256
258
- puts "Using following version:"
259
- pp mri_version : mri_version , jruby_version : jruby_version
260
-
261
- ENV [ 'RBENV_VERSION' ] = mri_version
262
- sh 'rbenv version'
263
- sh 'bundle exec rake spec:installed'
257
+ Bundler . with_original_env do
258
+ sh 'ruby -v'
259
+ sh 'bundle exec rake spec:installed'
264
260
265
- ENV [ 'RBENV_VERSION' ] = jruby_version
266
- sh 'rbenv version'
267
- sh 'bundle exec rake spec:installed'
261
+ env = { "PATH" => "#{ ENV [ 'CONCURRENT_JRUBY_HOME' ] } /bin:#{ ENV [ 'PATH' ] } " }
262
+ sh env , 'ruby -v'
263
+ sh env , 'bundle exec rake spec:installed'
264
+ end
268
265
269
266
puts 'Windows build is untested'
270
-
271
- ENV [ 'RBENV_VERSION' ] = old
272
267
end
273
268
end
274
269
0 commit comments