summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2019-11-28 12:29:58 +0100
committerDavid Rodríguez <deivid.rodriguez@riseup.net>2019-11-28 15:37:24 +0100
commitd75ee1844fa1f122bd0aed6b06191280f02052a8 (patch)
tree2baa8b04e2fc0de8084c8f2876a45bf3d7a0cb8d
parentdc35ae8d6733030a71de73973c8e5cbf9cbba50c (diff)
downloadbundler-d75ee1844fa1f122bd0aed6b06191280f02052a8.tar.gz
`Gem::Specification#activate` should always be defined
-rw-r--r--spec/runtime/setup_spec.rb18
1 files changed, 8 insertions, 10 deletions
diff --git a/spec/runtime/setup_spec.rb b/spec/runtime/setup_spec.rb
index e4a9dc95cd..dd6e35d141 100644
--- a/spec/runtime/setup_spec.rb
+++ b/spec/runtime/setup_spec.rb
@@ -1212,17 +1212,15 @@ end
let(:activation_warning_hack) { strip_whitespace(<<-RUBY) }
require #{spec_dir.join("support/hax").to_s.dump}
- if Gem::Specification.instance_methods.map(&:to_sym).include?(:activate)
- Gem::Specification.send(:alias_method, :bundler_spec_activate, :activate)
- Gem::Specification.send(:define_method, :activate) do
- unless #{exemptions.inspect}.include?(name)
- warn '-' * 80
- warn "activating \#{full_name}"
- warn(*caller)
- warn '*' * 80
- end
- bundler_spec_activate
+ Gem::Specification.send(:alias_method, :bundler_spec_activate, :activate)
+ Gem::Specification.send(:define_method, :activate) do
+ unless #{exemptions.inspect}.include?(name)
+ warn '-' * 80
+ warn "activating \#{full_name}"
+ warn(*caller)
+ warn '*' * 80
end
+ bundler_spec_activate
end
RUBY