Sha256: 9dcb133af42f0f6471c20d400d5c12ca67ca00244275d65ad3a237916729eaba
Contents?: true
Size: 465 Bytes
Versions: 3
Compression:
Stored size: 465 Bytes
Contents
require 'spec_helper' class Foo def self.reset @@foo = nil end def reload @reload = true self end def foo(*a) @@foo ||= 0 @@foo += 1 end memoize method: :foo end describe Mize, 'cache_clear' do let(:foo) { Foo.new } describe '#cache_clear' do it 'clears cache after Mize.cache_clear' do expect(foo.foo).to eq 1 expect(foo.foo).to eq 1 Mize.cache_clear expect(foo.foo).to eq 2 end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
mize-0.0.2 | spec/mize/global_clear_spec.rb |
mize-0.0.1 | spec/mize/global_clear_spec.rb |
mize-0.0.0 | spec/mize/global_clear_spec.rb |