Sha256: 865e7d93bf136d5162b1d022ad7437f005cf2a93c6bad22fedf1d2259821be84

Contents?: true

Size: 405 Bytes

Versions: 28

Compression:

Stored size: 405 Bytes

Contents

require File.expand_path("#{File.dirname(__FILE__)}/../../spec_helper")

describe "dont_allow called after stub" do
  context "when the subject method is called" do
    it "raises a TimesCalledError" do
      subject = Object.new
      stub(subject).foobar
      dont_allow(subject).foobar
      lambda do
        subject.foobar
      end.should raise_error(RR::Errors::TimesCalledError)
    end
  end
end

Version data entries

28 entries across 24 versions & 5 rubygems

Version Path
rr-1.0.1 spec/api/dont_allow/dont_allow_after_stub_spec.rb
rr-1.0.0 spec/api/dont_allow/dont_allow_after_stub_spec.rb
rr-0.10.11 spec/api/dont_allow/dont_allow_after_stub_spec.rb
rr-0.10.10 spec/api/dont_allow/dont_allow_after_stub_spec.rb
rr-0.10.9 spec/api/dont_allow/dont_allow_after_stub_spec.rb
rr-0.10.8 spec/api/dont_allow/dont_allow_after_stub_spec.rb
rr-0.10.7 spec/api/dont_allow/dont_allow_after_stub_spec.rb
rr-0.10.6 spec/api/dont_allow/dont_allow_after_stub_spec.rb