summaryrefslogtreecommitdiff
path: root/spec/ruby/language/predefined_spec.rb
diff options
context:
space:
mode:
authorBenoit Daloze <[email protected]>2019-04-27 18:53:23 +0200
committerBenoit Daloze <[email protected]>2019-04-27 18:53:23 +0200
commita1b4816759418ca8fe510e8739622fc5d77ab0f0 (patch)
tree9d4fb6091d0086817f5bde46bf1150e9130d34fd /spec/ruby/language/predefined_spec.rb
parent00c33d9c232ed1a79eda17acd7231ac93caa162b (diff)
Update to ruby/spec@15c9619
Diffstat (limited to 'spec/ruby/language/predefined_spec.rb')
-rw-r--r--spec/ruby/language/predefined_spec.rb47
1 files changed, 14 insertions, 33 deletions
diff --git a/spec/ruby/language/predefined_spec.rb b/spec/ruby/language/predefined_spec.rb
index 36392c7b8a..58201b8cbd 100644
--- a/spec/ruby/language/predefined_spec.rb
+++ b/spec/ruby/language/predefined_spec.rb
@@ -1088,44 +1088,25 @@ TRUE TrueClass Synonym for true.
=end
describe "The predefined global constants" do
- ruby_version_is ""..."2.4" do
- it "includes TRUE" do
- Object.const_defined?(:TRUE).should == true
+ it "includes TRUE" do
+ Object.const_defined?(:TRUE).should == true
+ -> {
TRUE.should equal(true)
- end
+ }.should complain(/constant ::TRUE is deprecated/)
+ end
- it "includes FALSE" do
- Object.const_defined?(:FALSE).should == true
+ it "includes FALSE" do
+ Object.const_defined?(:FALSE).should == true
+ -> {
FALSE.should equal(false)
- end
-
- it "includes NIL" do
- Object.const_defined?(:NIL).should == true
- NIL.should equal(nil)
- end
+ }.should complain(/constant ::FALSE is deprecated/)
end
- ruby_version_is "2.4" do
- it "includes TRUE" do
- Object.const_defined?(:TRUE).should == true
- -> {
- TRUE.should equal(true)
- }.should complain(/constant ::TRUE is deprecated/)
- end
-
- it "includes FALSE" do
- Object.const_defined?(:FALSE).should == true
- -> {
- FALSE.should equal(false)
- }.should complain(/constant ::FALSE is deprecated/)
- end
-
- it "includes NIL" do
- Object.const_defined?(:NIL).should == true
- -> {
- NIL.should equal(nil)
- }.should complain(/constant ::NIL is deprecated/)
- end
+ it "includes NIL" do
+ Object.const_defined?(:NIL).should == true
+ -> {
+ NIL.should equal(nil)
+ }.should complain(/constant ::NIL is deprecated/)
end
it "includes STDIN" do