Sha256: d83128d66886cb0940ff1306ea45ee9380acd92f47b330917a819c5d23768230
Contents?: true
Size: 541 Bytes
Versions: 1
Compression:
Stored size: 541 Bytes
Contents
require 'muack/definition' module Muack class Modifier < Struct.new(:mock, :defi) # Public API def with_any_args defi.args = [WithAnyArgs] self end # Public API def times number if number >= 1 (number - 1).times{ mock.__mock_defis_push(defi) } elsif number == 0 mock.__mock_defis_pop(defi) else raise "What would you expect from calling a method #{number} times?" end self end # Public API def object mock.object end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
muack-0.5.1 | lib/muack/modifier.rb |