diff options
author | Michael Herold <opensource@michaeljherold.com> | 2020-10-22 20:51:14 -0500 |
---|---|---|
committer | Michael Herold <> | 2020-10-22 20:51:14 -0500 |
commit | ac2444c3c9d020b2d0ef1b011b5bdb37d2b4af62 (patch) | |
tree | c2d18650a73e8048635d8d4b53ae7c83c185257f /spec | |
parent | 75410a6657090348de7bff3e5eab8aa684e49c38 (diff) | |
download | hashie-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.
Diffstat (limited to 'spec')
-rw-r--r-- | spec/hashie/dash_spec.rb | 2 |
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 |