More resilient test doubles for RSpec.