blob: 6b545ae3cf7a2a26ea65294cb2da3790ea8fe1e2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
From 871eb31e3bfe50705ca57e754771aa1e0164f12d Mon Sep 17 00:00:00 2001
From: Myron Marston <myron.marston@gmail.com>
Date: Sat, 30 Dec 2017 17:45:43 -0800
Subject: [PATCH] Skip spec that does not apply to Ruby 2.5.
Ruby 2.5 has removed the ability to access top-level constants
via a confusing nested form (e.g. `MyClass::Hash`), so we no
longer need this spec there.
For #1192.
---
spec/rspec/mocks/mutate_const_spec.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/spec/rspec/mocks/mutate_const_spec.rb b/spec/rspec/mocks/mutate_const_spec.rb
index fe8d4128..9d80dd73 100644
--- a/spec/rspec/mocks/mutate_const_spec.rb
+++ b/spec/rspec/mocks/mutate_const_spec.rb
@@ -170,7 +170,7 @@ def change_const_value_to(value)
expect(::Hash).to equal(top_level_hash)
end
- it 'does not affect the ability to access the top-level constant from nested contexts', :silence_warnings do
+ it 'does not affect the ability to access the top-level constant from nested contexts', :silence_warnings, :if => RUBY_VERSION < '2.5' do
top_level_hash = ::Hash
hide_const("TestClass::Hash")
|