diff options
author | SHIBATA Hiroshi <hsbt@ruby-lang.org> | 2018-11-27 21:03:52 +0900 |
---|---|---|
committer | SHIBATA Hiroshi <hsbt@ruby-lang.org> | 2018-11-27 21:03:52 +0900 |
commit | 0942a9c8455aab9ada6d1aebf81ca0b4b8d2c579 (patch) | |
tree | 076e786497edc9d1490ba6d4ecff9e78a6e04cd0 | |
parent | cf45792213fadf97f7aa6464de8ebd79f09725d2 (diff) | |
download | bundler-0942a9c8455aab9ada6d1aebf81ca0b4b8d2c579.tar.gz |
Following up ruby core changes.
* To use libexec instead of bin directory.
* Restore exe direcotry for bundler.gemspec while running test suite.
-rw-r--r-- | spec/spec_helper.rb | 12 | ||||
-rw-r--r-- | spec/support/path.rb | 2 |
2 files changed, 13 insertions, 1 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index f2ccccc5ef..9355bfb33f 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -123,6 +123,12 @@ RSpec.configure do |config| Gem.ruby = orig_ruby if ENV["BUNDLE_RUBY"] end + config.before :suite do + if ENV["BUNDLE_RUBY"] + FileUtils.cp_r Spec::Path.bindir, File.join(Spec::Path.root, "lib", "exe") + end + end + config.before :all do build_repo1 end @@ -147,4 +153,10 @@ RSpec.configure do |config| Dir.chdir(original_wd) ENV.replace(original_env) end + + config.after :suite do + if ENV["BUNDLE_RUBY"] + FileUtils.rm_rf File.join(Spec::Path.root, "lib", "exe") + end + end end diff --git a/spec/support/path.rb b/spec/support/path.rb index cecab45c9b..c28414e083 100644 --- a/spec/support/path.rb +++ b/spec/support/path.rb @@ -13,7 +13,7 @@ module Spec end def bindir - @bindir ||= root.join(ruby_core? ? "bin" : "exe") + @bindir ||= root.join(ruby_core? ? "libexec" : "exe") end def spec_dir |