Sha256: 1a07814ba83f7cc4444e53602dc1000257c9e2bc1199ad43aac40182551ba025

Contents?: true

Size: 893 Bytes

Versions: 4

Compression:

Stored size: 893 Bytes

Contents

require 'developwithpassion_arrays'

require 'core/arg_matching/arg_match_factory'
require 'core/arg_matching/block_arg_matcher'
require 'core/arg_matching/combined_arg_matcher'
require 'core/arg_matching/matches'
require 'core/arg_matching/regular_arg_matcher'
require 'core/arg_behaviour'
require 'core/arg_set'
require 'core/class_swap'
require 'core/class_swaps'
require 'core/fake'
require 'core/ignore_set'
require 'core/method_stub'
require 'singleton'

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

4 entries across 4 versions & 1 rubygems

Version Path
fakes-1.0.31 lib/fakes.rb
fakes-1.0.2 lib/fakes.rb
fakes-1.0.1 lib/fakes.rb
fakes-1.0.0 lib/fakes.rb