diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2019-02-24 06:14:53 +0100 |
---|---|---|
committer | David RodrÃguez <deivid.rodriguez@riseup.net> | 2019-03-08 11:53:28 +0100 |
commit | 8573555eef40da55b15840d9f18fe64c28857867 (patch) | |
tree | b265f790cd4e044f75a5c47a1f3f4945f2d1043c | |
parent | e2dfa3dd60d41b58b80b05f46a9adbe1cb539152 (diff) | |
download | bundler-remove_old_1.8.7_remanents.tar.gz |
Fix 1.8.7 notesremove_old_1.8.7_remanents
-rw-r--r-- | spec/bundler/bundler_spec.rb | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/spec/bundler/bundler_spec.rb b/spec/bundler/bundler_spec.rb index bbfd877210..e33c8dc606 100644 --- a/spec/bundler/bundler_spec.rb +++ b/spec/bundler/bundler_spec.rb @@ -312,10 +312,9 @@ EOF let(:bundle_path) { Pathname("#{tmpdir}/bundle") } def clear_cached_requires_sudo - # Private in ruby 1.8.7 return unless Bundler.instance_variable_defined?(:@requires_sudo_ran) - Bundler.send(:remove_instance_variable, :@requires_sudo_ran) - Bundler.send(:remove_instance_variable, :@requires_sudo) + Bundler.remove_instance_variable(:@requires_sudo_ran) + Bundler.remove_instance_variable(:@requires_sudo) end before do @@ -382,14 +381,8 @@ EOF after do FileUtils.rm_rf("tmp/vendor/bundle") FileUtils.rm_rf("tmp/vendor/bin_dir") - if Bundler.respond_to?(:remove_instance_variable) - Bundler.remove_instance_variable(:@requires_sudo_ran) - Bundler.remove_instance_variable(:@requires_sudo) - else - # TODO: Remove these code when Bundler drops Ruby 1.8.7 support - Bundler.send(:remove_instance_variable, :@requires_sudo_ran) - Bundler.send(:remove_instance_variable, :@requires_sudo) - end + Bundler.remove_instance_variable(:@requires_sudo_ran) + Bundler.remove_instance_variable(:@requires_sudo) end context "writable paths" do it "should return false and display nothing" do |