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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With