Ruby: Record methods calls and can replay them later
Ruby
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
spec
.travis.yml
Gemfile
Gemfile.lock
Rakefile
Readme.md
method_call_recorder.gemspec

Readme.md

Ruby: Record methods calls and replay them later

Install

gem install method_call_recorder

Usage

recorder = MethodCallRecorder.new

# nothing happens
recorder.foo
recorder.bar :abc
recorder.baz :xyz do |blob|
  puts blob
end

puts recorder.recorded

# calls get made to subject
recorder.replay(subject)

TODO

  • make it possible to record #recorded or #replay by using recorder.proxy for recording which inheroits from e.g. BlankObject

Author

Michael Grosser
michael@grosser.it
License: MIT
Build Status