REPL Mocks in Rspec 2.9
REPL (Read-Eval-Print-Loop) is a great way to learn.
Sarah Allen has a great post on REPL and rspec.
Sarah’s Post on REPL Rspec
In Rspec 2.9 there is a nice way to get the standalone way working
$ irb
1.9.2p290 :001 > require 'rspec/mocks/standalone'
1.9.2p290 :002 > Time.stub(:now) {1}
1.9.2p290 :003 > Time.now
=> 1
One Trackback
[...] [update for repl mocks for RSpec 2.9 by Curtis Schofield] [...]