README in rr-0.1.5 vs README in rr-0.1.6
- old
+ new
@@ -23,9 +23,16 @@
The following example verifies render partial will be called and
renders the partial.
view = controller.template
probe(view).render(:partial => "user_info")
+
+Probes also support after_call callbacks. This is useful for Stubbing out
+a class method and getting its return value. For example, using ActiveRecord:
+
+ probe(User).find('5') do |user|
+ mock(user).valid? {false}
+ end
== Block Syntax
script = MyScript.new
mock(script) do |m|
m.system("cd #{RAILS_ENV}") {true}