Sha256: 335895a5a817e072f67b59d06a509afabb9711ea80217b6689636fb92f0e6042
Contents?: true
Size: 397 Bytes
Versions: 3
Compression:
Stored size: 397 Bytes
Contents
# encoding: utf-8 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
3 entries across 3 versions & 1 rubygems