Sha256: 4ca2673f8e07d85d3ea05dce81166c8ae314b8a6fbc420dd5aca253e34f3c70f
Contents?: true
Size: 505 Bytes
Versions: 3
Compression:
Stored size: 505 Bytes
Contents
require 'spec_helper' describe Bogus::FakeRegistry do let(:fake_registry) { Bogus::FakeRegistry.new } it "knows the fake's names" do object = Object.new fake_registry.store(:name, object) expect(fake_registry.name(object)).to eq :name end it "returns name based on object identity" do example = Struct.new(:id) object = example.new(1) duplicate = example.new(1) fake_registry.store(:object, object) expect(fake_registry.name(duplicate)).to be_nil end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
bogus-0.1.7 | spec/bogus/fakes/fake_registry_spec.rb |
bogus-0.1.6 | spec/bogus/fakes/fake_registry_spec.rb |
bogus-0.1.5 | spec/bogus/fakes/fake_registry_spec.rb |