Sha256: 9e78e4ada874f42d9f256c313dc70e36ba4ab578e1cf517011211db41baaccb9
Contents?: true
Size: 540 Bytes
Versions: 4
Compression:
Stored size: 540 Bytes
Contents
describe HashPresenter::Cached do extend BaseHashPresenterTest test_presenter(HashPresenter::Cached) context 'Special Behavior' do it 'should not depend on an attribute object' do original = { a: 2 } hp = HashPresenter::Cached.new(original) expect(hp.a).to eq(2) original[:a] = 3 expect(hp.a).to eq(2) end it 'should not calculate result for a nested hash twice' do hp = HashPresenter::Cached.new(a: { b: 1 }) expect(hp.a.object_id).to eq(hp.a.object_id) end end end
Version data entries
4 entries across 4 versions & 1 rubygems