Sha256: 956ef22149388f1244964cab1e8ce12d679bbc274e40790df78cb80d919f369d
Contents?: true
Size: 383 Bytes
Versions: 2
Compression:
Stored size: 383 Bytes
Contents
class SpyInternet def initialize @requests = [] end def execute(request) @requests << request @response end def must_have_been_asked_to_execute(what) @requests.any?{|it| it.eql? what}.must_be :==, true, "Unable to locate match for:\n\n#{what.inspect}\n\nin:\n\n#{@requests.inspect}" end def always_return(response) @response = response end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
richard_iii-0.1.1 | test/support/spy_internet.rb |
richard_iii-0.1.0 | test/support/spy_internet.rb |