Sha256: 056777ad24064a7d20843a8ee2902f8498486242e9ba194fa60e1a252af494b2
Contents?: true
Size: 676 Bytes
Versions: 11
Compression:
Stored size: 676 Bytes
Contents
require 'spec_helper' module RSpec module Mocks describe "only stashing the original method" do let(:klass) do Class.new do def self.foo(arg) :original_value end end end it "should keep the original method intact after multiple expectations are added on the same method" do klass.should_receive(:foo).with(:fizbaz).and_return(:wowwow) klass.should_receive(:foo).with(:bazbar).and_return(:okay) klass.foo(:fizbaz) klass.foo(:bazbar) klass.rspec_verify klass.rspec_reset klass.foo(:yeah).should equal(:original_value) end end end end
Version data entries
11 entries across 11 versions & 1 rubygems