module Muack::API
Public Instance Methods
allowing(spec)
click to toggle source
# File lib/muack.rb, line 81 def allowing spec Muack::Allowing.new(spec) end
any_instance_of(klass) { |ret| ... }
click to toggle source
# File lib/muack.rb, line 44 def any_instance_of klass ret = Muack.session.any_instance_of(klass) if block_given? then yield(ret) else ret end end
anything()
click to toggle source
# File lib/muack.rb, line 49 def anything Muack::Anything.new end
coat(obj=Object.new) { |ret| ... }
click to toggle source
# File lib/muack.rb, line 34 def coat obj=Object.new ret = Muack.session.coat(obj) if block_given? then yield(ret) else ret end end
hash_including(spec)
click to toggle source
# File lib/muack.rb, line 101 def hash_including spec $stderr.puts("Muack::API.hash_including is deprecated." \ " Use Muack::API.having instead.") having(spec) end
having(spec)
click to toggle source
# File lib/muack.rb, line 77 def having spec Muack::Having.new(spec) end
including(element)
click to toggle source
# File lib/muack.rb, line 61 def including element Muack::Including.new(element) end
is_a(klass)
click to toggle source
# File lib/muack.rb, line 53 def is_a klass Muack::IsA.new(klass) end
match(regexp)
click to toggle source
# File lib/muack.rb, line 89 def match regexp $stderr.puts("Muack::API.match is deprecated." \ " Use Muack::API.matching instead.") matching(regexp) end
matching(regexp)
click to toggle source
# File lib/muack.rb, line 57 def matching regexp Muack::Matching.new(regexp) end
mock(obj=Object.new) { |ret| ... }
click to toggle source
# File lib/muack.rb, line 24 def mock obj=Object.new ret = Muack.session.mock(obj) if block_given? then yield(ret) else ret end end
respond_to(*msg)
click to toggle source
# File lib/muack.rb, line 95 def respond_to *msg $stderr.puts("Muack::API.respond_to is deprecated." \ " Use Muack::API.responding_to instead.") responding_to(*msg) end
responding_to(*msg)
click to toggle source
# File lib/muack.rb, line 69 def responding_to *msg Muack::RespondingTo.new(*msg) end
satisfy(&block)
click to toggle source
# File lib/muack.rb, line 107 def satisfy &block $stderr.puts("Muack::API.satisfy is deprecated." \ " Use Muack::API.satisfying instead.") satisfying(&block) end
satisfying(&block)
click to toggle source
# File lib/muack.rb, line 85 def satisfying &block Muack::Satisfying.new(&block) end
spy(obj) { |ret| ... }
click to toggle source
# File lib/muack.rb, line 39 def spy obj ret = Muack.session.spy(obj) if block_given? then yield(ret) else ret end end
stub(obj=Object.new) { |ret| ... }
click to toggle source
# File lib/muack.rb, line 29 def stub obj=Object.new ret = Muack.session.stub(obj) if block_given? then yield(ret) else ret end end
where(spec)
click to toggle source
# File lib/muack.rb, line 73 def where spec Muack::Where.new(spec) end
within(range_or_array)
click to toggle source
# File lib/muack.rb, line 65 def within range_or_array Muack::Within.new(range_or_array) end