diff options
author | Victor Shepelev <zverok.offline@gmail.com> | 2022-09-30 12:23:19 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-30 18:23:19 +0900 |
commit | ad651925e365ca18645f05b5e9b2eca9cd5721bc (patch) | |
tree | 37536bfdd4a35061505d1364fc6a084140ba5a30 /spec/ruby | |
parent | e294e6f417acc27d85c6e6a0e67ebf7a07c83485 (diff) | |
download | ruby-ad651925e365ca18645f05b5e9b2eca9cd5721bc.tar.gz |
Add Data class implementation: Simple immutable value object
Diffstat (limited to 'spec/ruby')
-rw-r--r-- | spec/ruby/core/data/constants_spec.rb | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/spec/ruby/core/data/constants_spec.rb b/spec/ruby/core/data/constants_spec.rb index 1d469f9237..d9d55b50f9 100644 --- a/spec/ruby/core/data/constants_spec.rb +++ b/spec/ruby/core/data/constants_spec.rb @@ -14,10 +14,22 @@ ruby_version_is ''...'3.0' do end end -ruby_version_is '3.0' do +ruby_version_is '3.0'...'3.2' do describe "Data" do it "does not exist anymore" do Object.should_not have_constant(:Data) end end end + +ruby_version_is '3.2' do + describe "Data" do + it "is a new constant" do + Data.superclass.should == Object + end + + it "is not deprecated" do + -> { Data }.should_not complain + end + end +end |