Sha256: b411d5a21f40de635ea0c91e9f2c140cc371c5cd4dd9df7675b9a4aef858bf62

Contents?: true

Size: 278 Bytes

Versions: 12

Compression:

Stored size: 278 Bytes

Contents

class FakeCreatorOfFakes
  def create(name, opts = {}, &block)
    fake = [name, opts, block && block.call]
    fakes << fake
    fake
  end

  def fakes
    @fakes ||= []
  end

  def has_created?(name, opts = {}, klass = nil)
    fakes.include?([name, opts, klass])
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
bogus-0.1.7 spec/support/fake_creator_of_fakes.rb
bogus-0.1.6 spec/support/fake_creator_of_fakes.rb
bogus-0.1.5 spec/support/fake_creator_of_fakes.rb
bogus-0.1.4 spec/support/fake_creator_of_fakes.rb
bogus-0.1.3 spec/support/fake_creator_of_fakes.rb
bogus-0.1.2 spec/support/fake_creator_of_fakes.rb
bogus-0.1.1 spec/support/fake_creator_of_fakes.rb
bogus-0.1.0 spec/support/fake_creator_of_fakes.rb
bogus-0.0.4 spec/support/fake_creator_of_fakes.rb
bogus-0.0.3 spec/support/fake_creator_of_fakes.rb
bogus-0.0.3.rc.2 spec/support/fake_creator_of_fakes.rb
bogus-0.0.3.rc.1 spec/support/fake_creator_of_fakes.rb