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
You need to
require 'rspec/mocks/standalone', as stated in the documentation.