Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

33 lines (24 sloc) 1.96 KB


  • Substitutability can check argument names
  • Fix error message when there are no api methods. Used to say "Doesn't know initialize, only knows "


  • bang methods map to ivars suffixed with _b, because you can't have a bang in an ivar name
  • Add general syntax for overriding values (e.g. for use with operators) will_overrides
  • block assertions can specify that exceptions should get raised (still shitty error messages, though) The interface mimicks RSpec's #raise_error matcher


  • Setting an override still requires the invoking code to call with the correct signature
  • Remove api_method_names and api_method_for and invocations from surrogates (might break your code if you relied on these, but they were never advertized, and no obvious reason to use them) Instead use the reflectors: Surrogate::SurrogateClassReflector and Surrogate::SurrogateInstanceReflector
  • BREAKING CHANGE - Substitutability can check argument "types". This is turned on by default
  • Initialize is no longer implicitly recorded (This might break something, but I don't think this feature was ever advertized, so hopefully people don't depend on it).
  • BREAKING CHANGE - API method signatures are enforced (if meth takes 1 arg, you must pass it 1 arg)
  • The name of a clone is the name of the parent suffixed with '.clone', unless the parent is anonymous (not set to a const), then the name is nil.
  • Inspect messages are shorter and more helpful
  • Inspect messages on class clones mimic the parents
  • Remove comment about the new syntax in the Readme. If you want to switch over, here is a shell script that should get you pretty far:

    find spec -type file | xargs ruby -p -i.old_syntax \ -e 'gsub /should(not)?(\s+)have_been_told_to/, "was\1\2told_to"' \ -e 'gsub /should(_not)?(\s+)have_been_asked(if|for)(its)?/, "was\1\2asked\3"' \ -e 'gsub /should(_not)(\s+)have_been_initialized_with/, "was\1\2initialized_with"' \

Jump to Line
Something went wrong with that request. Please try again.