Ruby - Testing with RSpec and Minitest
Identify the error in this Ruby test double code:
product = double('product')
allow(product).to receive(:price).and_return(100)
puts product.costIdentify the error in this Ruby test double code:
product = double('product')
allow(product).to receive(:price).and_return(100)
puts product.costprice is stubbed to return 100.product.cost, which is not stubbed, causing an error.cost causes an error -> Option A15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions