Within my test I want to stub a canned response for any instance of a class.
It might look like something like:
Book.stubs(:title).any_instance().ret
You cannot stub all instances of a class, but you can stub any instance method of a given object like this:
require "minitest/mock" book = Book.new book.stub(:title, 'War and Peace') do assert_equal 'War and Peace', book.title end