Sha256: f010ccac666d61eaed1755af55f4a5e45e0eff62adda6038bc93a25b8f528e4b

Contents?: true

Size: 417 Bytes

Versions: 5

Compression:

Stored size: 417 Bytes

Contents

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

  def arg_match
    return ArgumentMatching
  end

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

  def reset_fake_classes
    ClassSwaps.instance.reset
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
fakes-1.1.6 lib/fakes/fakes.rb
fakes-1.1.5 lib/fakes/fakes.rb
fakes-1.1.4 lib/fakes/fakes.rb
fakes-1.1.3 lib/fakes/fakes.rb
fakes-1.1.2 lib/fakes/fakes.rb