summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2019-02-24 06:14:53 +0100
committerDavid Rodríguez <deivid.rodriguez@riseup.net>2019-03-08 11:53:28 +0100
commit8573555eef40da55b15840d9f18fe64c28857867 (patch)
treeb265f790cd4e044f75a5c47a1f3f4945f2d1043c
parente2dfa3dd60d41b58b80b05f46a9adbe1cb539152 (diff)
downloadbundler-remove_old_1.8.7_remanents.tar.gz
-rw-r--r--spec/bundler/bundler_spec.rb15
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