summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Herold <opensource@michaeljherold.com>2020-10-22 20:51:14 -0500
committerMichael Herold <>2020-10-22 20:51:14 -0500
commitac2444c3c9d020b2d0ef1b011b5bdb37d2b4af62 (patch)
treec2d18650a73e8048635d8d4b53ae7c83c185257f
parent75410a6657090348de7bff3e5eab8aa684e49c38 (diff)
downloadhashie-ac2444c3c9d020b2d0ef1b011b5bdb37d2b4af62.tar.gz
Fix an imprecise spec for `Dash#replace`
The check here doesn't make sense because it's testing the behavior of another method. The best way to check identity is but checking the `#object_id` of an object - thus, this check actually does what the test says it does.
-rw-r--r--spec/hashie/dash_spec.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/hashie/dash_spec.rb b/spec/hashie/dash_spec.rb
index 3adfc8f..c64e400 100644
--- a/spec/hashie/dash_spec.rb
+++ b/spec/hashie/dash_spec.rb
@@ -344,7 +344,7 @@ describe DashTest do
before { subject.replace(first_name: 'Cain') }
it 'return self' do
- expect(subject.replace(email: 'bar').to_hash).to eq(email: 'bar', count: 0)
+ expect(subject.replace(email: 'bar').object_id).to eq subject.object_id
end
it 'sets all specified keys to their corresponding values' do