RSpec mock from test console

Viewed 5291

I want to test out RSpec stubbing and mocking from a rails test console . Is it possible ? If yes , how ?

This is what I tried :

$rails c test
>require "./spec/spec_helper"
true
>source = double('source')
NoMethodError: undefined method `double' for main:Object
2 Answers
Related