summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2019-03-28 17:36:28 +0100
committerDavid Rodríguez <deivid.rodriguez@riseup.net>2019-03-30 10:50:11 +0100
commit94aea34a9df3f50fdafceee500bd8080fe9fc55d (patch)
tree53ccdb5b372950bdc81db12c7b8f9c276cd8e1a6
parent3df21cc3e46bbdacfaf09299c8d47856f0067307 (diff)
downloadbundler-complete_some_missing_specs.tar.gz
Add `clean_{exec,system}` deprecation specscomplete_some_missing_specs
-rw-r--r--spec/other/major_deprecation_spec.rb36
1 files changed, 36 insertions, 0 deletions
diff --git a/spec/other/major_deprecation_spec.rb b/spec/other/major_deprecation_spec.rb
index f2c28e6f6b..39bba9c3da 100644
--- a/spec/other/major_deprecation_spec.rb
+++ b/spec/other/major_deprecation_spec.rb
@@ -48,6 +48,42 @@ RSpec.describe "major deprecations" do
end
end
+ describe ".clean_system" do
+ before do
+ source = "Bundler.clean_system('ls')"
+ bundle "exec ruby -e #{source.dump}"
+ end
+
+ it "is not deprecated", :bundler => "< 2" do
+ expect(deprecations).to be_empty
+ end
+
+ it "is deprecated in favor of .unbundled_system", :bundler => "2" do
+ expect(deprecations).to include(
+ "`Bundler.clean_system` has been deprecated in favor of `Bundler.unbundled_system`. " \
+ "If you instead want to run the command in the environment before bundler was originally loaded, use `Bundler.original_system`"
+ )
+ end
+ end
+
+ describe ".clean_exec" do
+ before do
+ source = "Bundler.clean_exec('ls')"
+ bundle "exec ruby -e #{source.dump}"
+ end
+
+ it "is not deprecated", :bundler => "< 2" do
+ expect(deprecations).to be_empty
+ end
+
+ it "is deprecated in favor of .unbundled_exec", :bundler => "2" do
+ expect(deprecations).to include(
+ "`Bundler.clean_exec` has been deprecated in favor of `Bundler.unbundled_exec`. " \
+ "If you instead want to exec to a command in the environment before bundler was originally loaded, use `Bundler.original_exec`"
+ )
+ end
+ end
+
describe ".environment" do
before do
source = "Bundler.environment"