Sha256: 37cc956603d54d4edec4ffea4ac7c1cdccc4e7e3e51ef5b31013cbdf6f8eccad
Contents?: true
Size: 676 Bytes
Versions: 2
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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rspec-mocks-2.0.0.beta.8 | spec/rspec/mocks/stash_spec.rb |
rspec-mocks-2.0.0.beta.7 | spec/rspec/mocks/stash_spec.rb |