Sha256: 6be260cdc2be2897a2cc58767152e479f2fcbe91f11ec00e3a6efa8ef54e10bb
Contents?: true
Size: 378 Bytes
Versions: 18
Compression:
Stored size: 378 Bytes
Contents
shared_examples_for 'an idempotent method' do it 'is idempotent' do first = subject fail 'RSpec not configured for threadsafety' unless RSpec.configuration.threadsafe? mutex = __memoized.instance_variable_get(:@mutex) memoized = __memoized.instance_variable_get(:@memoized) mutex.synchronize { memoized.delete(:subject) } should equal(first) end end
Version data entries
18 entries across 18 versions & 2 rubygems