1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
This commit is contained in:
Benoit Daloze 2019-04-27 18:53:23 +02:00
parent 00c33d9c23
commit a1b4816759
193 changed files with 3026 additions and 3387 deletions

View file

@ -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
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 ::TRUE 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 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