README.md in assert-2.16.4 vs README.md in assert-2.16.5
- old
+ new
@@ -63,10 +63,20 @@
**Note**: Assert is tested using itself. The tests are a good place to look for examples and usage patterns.
## Stub
+Assert comes with a stubbing API - all it does is replace method calls. In general it tries to be friendly and complain if stubbing doesn't match up with the object/method being stubbed:
+
+* each stub takes a block that is called in place of the method
+* complains if you stub a method that the object doesn't respond to
+* complains if you stub with an arity mismatch
+* no methods are added to `Object` to support stubbing
+* stubs are auto-unstubbed on test teardown
+
+**Note**: Assert's stubbing logic has been extracted into a separate gem: [MuchStub](https://github.com/redding/much-stub/#muchstub). However, the main `Assert.{stub|unstub|stub_send|etc}` api is still available (it just proxies MuchStub now).
+
```ruby
myclass = Class.new do
def mymeth; 'meth'; end
def myval(val); val; end
end
@@ -115,18 +125,10 @@
# => 123
myobj.myval(456)
# => 456
```
-Assert comes with a stubbing API - all it does is replace method calls. In general it tries to be friendly and complain if stubbing doesn't match up with the object/method being stubbed:
-
-* each stub takes a block that is called in place of the method
-* complains if you stub a method that the object doesn't respond to
-* complains if you stub with an arity mismatch
-* no methods are added to `Object` to support stubbing
-* stubs are auto-unstubbed on test teardown
-
## Factory
```ruby
require 'assert/factory'
@@ -170,9 +172,11 @@
def self.data
{ Factory.string => Factory.string }
end
end
```
+
+**Note**: Assert's factory logic has been extracted into a separate gem: [MuchFactory](https://github.com/redding/much-factory/#muchfactory). However, the main api above is still available (it just delegates to MuchFactory now).
## CLI
```sh
$ assert --help