Sha256: 063750627915d8e48df35a7a5c88656ecbe7a8a1a35819f7fb2170c49da93631

Contents?: true

Size: 436 Bytes

Versions: 1

Compression:

Stored size: 436 Bytes

Contents

class Object
  def fake(invocations = {})
    item = Fakes::Fake.new
    invocations.each{|method,return_value| item.stub(method).and_return(return_value)}
    item
  end

  def arg_match
    return Fakes::Matches
  end

  def fake_class(klass,invocations = {})
    item = fake(invocations)
    Fakes::ClassSwaps.instance.add_fake_for(klass,item)
    item
  end

  def reset_fake_classes
    Fakes::ClassSwaps.instance.reset
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fakes-1.1.1 lib/fakes/fakes.rb