Sha256: 39f917852eb8b5ff8d3230672f2e17726ea8d679a1410df0b0f0d67f4ac8902f

Contents?: true

Size: 1.81 KB

Versions: 1

Compression:

Stored size: 1.81 KB

Contents

### 0.6.1

* 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

### 0.6.0

* 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"' \


Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
surrogate-0.6.1 Changelog.md