summaryrefslogtreecommitdiff
path: root/spec/ruby/core/data/hash_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/data/hash_spec.rb')
-rw-r--r--spec/ruby/core/data/hash_spec.rb36
1 files changed, 17 insertions, 19 deletions
diff --git a/spec/ruby/core/data/hash_spec.rb b/spec/ruby/core/data/hash_spec.rb
index 324a2abca4..bab146c92e 100644
--- a/spec/ruby/core/data/hash_spec.rb
+++ b/spec/ruby/core/data/hash_spec.rb
@@ -1,27 +1,25 @@
require_relative '../../spec_helper'
require_relative 'fixtures/classes'
-ruby_version_is "3.2" do
- describe "Data#hash" do
- it "returns the same integer for objects with the same content" do
- a = DataSpecs::Measure.new(42, "km")
- b = DataSpecs::Measure.new(42, "km")
- a.hash.should == b.hash
- a.hash.should be_an_instance_of(Integer)
- end
+describe "Data#hash" do
+ it "returns the same integer for objects with the same content" do
+ a = DataSpecs::Measure.new(42, "km")
+ b = DataSpecs::Measure.new(42, "km")
+ a.hash.should == b.hash
+ a.hash.should.instance_of?(Integer)
+ end
- it "returns different hashes for objects with different values" do
- a = DataSpecs::Measure.new(42, "km")
- b = DataSpecs::Measure.new(42, "ml")
- a.hash.should_not == b.hash
+ it "returns different hashes for objects with different values" do
+ a = DataSpecs::Measure.new(42, "km")
+ b = DataSpecs::Measure.new(42, "ml")
+ a.hash.should_not == b.hash
- a = DataSpecs::Measure.new(42, "km")
- b = DataSpecs::Measure.new(13, "km")
- a.hash.should_not == b.hash
- end
+ a = DataSpecs::Measure.new(42, "km")
+ b = DataSpecs::Measure.new(13, "km")
+ a.hash.should_not == b.hash
+ end
- it "returns different hashes for different classes" do
- Data.define(:x).new(1).hash.should != Data.define(:x).new(1).hash
- end
+ it "returns different hashes for different classes" do
+ Data.define(:x).new(1).hash.should != Data.define(:x).new(1).hash
end
end