Sha256: c63d7528c1bfaac38c9aabd81ea09e7fcadd186bb6c5a19676a39fef7146afde

Contents?: true

Size: 518 Bytes

Versions: 26

Compression:

Stored size: 518 Bytes

Contents

require 'roqua/core_ext/fabrication/singleton'

def Fabricate(name, overrides={}, &block)
  rand
end

describe Fabricate do
  it "returns singleton objects" do
    Fabricate.singleton(:one).should == Fabricate.singleton(:one)
  end

  it 'maintains multiple singletons' do
    Fabricate.singleton(:one).should_not == Fabricate.singleton(:two)
  end

  it 'clears singletons' do
    the_one = Fabricate.singleton(:one)
    Fabricate.clear_singletons!
    expect(Fabricate.singleton(:one)).not_to eq(the_one)
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
roqua-support-0.1.34 spec/roqua/core_ext/fabrication/singleton_spec.rb
roqua-support-0.1.33 spec/roqua/core_ext/fabrication/singleton_spec.rb
roqua-support-0.1.32 spec/roqua/core_ext/fabrication/singleton_spec.rb
roqua-support-0.1.31 spec/roqua/core_ext/fabrication/singleton_spec.rb
roqua-support-0.1.30 spec/roqua/core_ext/fabrication/singleton_spec.rb
roqua-support-0.1.29 spec/roqua/core_ext/fabrication/singleton_spec.rb
roqua-support-0.1.28 spec/roqua/core_ext/fabrication/singleton_spec.rb
roqua-support-0.1.27 spec/roqua/core_ext/fabrication/singleton_spec.rb
roqua-support-0.1.26 spec/roqua/core_ext/fabrication/singleton_spec.rb
roqua-support-0.1.25 spec/roqua/core_ext/fabrication/singleton_spec.rb
roqua-support-0.1.24 spec/roqua/core_ext/fabrication/singleton_spec.rb
roqua-support-0.1.23 spec/roqua/core_ext/fabrication/singleton_spec.rb
roqua-support-0.1.22 spec/roqua/core_ext/fabrication/singleton_spec.rb
roqua-support-0.1.21 spec/roqua/core_ext/fabrication/singleton_spec.rb
roqua-support-0.1.20 spec/roqua/core_ext/fabrication/singleton_spec.rb
roqua-support-0.1.19 spec/roqua/core_ext/fabrication/singleton_spec.rb
roqua-support-0.1.18 spec/roqua/core_ext/fabrication/singleton_spec.rb
roqua-support-0.1.17 spec/roqua/core_ext/fabrication/singleton_spec.rb
roqua-support-0.1.16 spec/roqua/core_ext/fabrication/singleton_spec.rb
roqua-support-0.1.15 spec/roqua/core_ext/fabrication/singleton_spec.rb