Sha256: 7bcc858ed3c590846e6b88a296727a1641e76b72be6eb602775cc1f8c7dc814a
Contents?: true
Size: 786 Bytes
Versions: 12
Compression:
Stored size: 786 Bytes
Contents
# encoding: utf-8 require 'spec_helper' require 'ice_nine/support/recursion_guard' describe IceNine::RecursionGuard::ObjectSet, '#guard' do let(:object) { IceNine::RecursionGuard::ObjectSet.new } let(:object_arg) { Object.new } let(:return_value) { double('return_value') } context 'when the block is not recursive' do subject { object.guard(object_arg) { return_value } } it 'returns the expected value' do should be(return_value) end end context 'when the block is recursive' do subject do object.guard(object_arg) do expect(subject).to be(object_arg) return_value end end it 'returns the expected value' do should be(return_value) end end end
Version data entries
12 entries across 10 versions & 4 rubygems