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
bitclust-core-0.5.3 vendor/bundle/ruby/1.9.1/gems/bitclust-core-0.5.1/vendor/bundle/ruby/1.9.1/gems/rr-1.0.4/spec/api/dont_allow/dont_allow_after_stub_spec.rb
bitclust-core-0.5.3 vendor/bundle/ruby/1.9.1/gems/bitclust-core-0.5.3/vendor/bundle/ruby/1.9.1/gems/rr-1.0.4/spec/api/dont_allow/dont_allow_after_stub_spec.rb
bitclust-core-0.5.3 vendor/bundle/ruby/1.9.1/gems/bitclust-core-0.5.3/vendor/bundle/ruby/1.9.1/gems/bitclust-core-0.5.1/vendor/bundle/ruby/1.9.1/gems/rr-1.0.4/spec/api/dont_allow/dont_allow_after_stub_spec.rb
bitclust-core-0.5.3 vendor/bundle/ruby/1.9.1/gems/rr-1.0.4/spec/api/dont_allow/dont_allow_after_stub_spec.rb
bitclust-core-0.5.2 vendor/bundle/ruby/1.9.1/gems/bitclust-core-0.5.1/vendor/bundle/ruby/1.9.1/gems/rr-1.0.4/spec/api/dont_allow/dont_allow_after_stub_spec.rb
bitclust-core-0.5.2 vendor/bundle/ruby/1.9.1/gems/rr-1.0.4/spec/api/dont_allow/dont_allow_after_stub_spec.rb
bitclust-core-0.5.1 vendor/bundle/ruby/1.9.1/gems/rr-1.0.4/spec/api/dont_allow/dont_allow_after_stub_spec.rb
mcmire-rr-1.0.5.rc1 spec/api/dont_allow/dont_allow_after_stub_spec.rb
messagebus_ruby_api-0.4.7 spec/ruby/1.9.1/gems/rr-1.0.2/spec/api/dont_allow/dont_allow_after_stub_spec.rb
messagebus_ruby_api-0.4.4 spec/ruby/1.9.1/gems/rr-1.0.2/spec/api/dont_allow/dont_allow_after_stub_spec.rb
rr-1.0.4 spec/api/dont_allow/dont_allow_after_stub_spec.rb
rr-1.0.3 spec/api/dont_allow/dont_allow_after_stub_spec.rb
vim-jar-0.1.2.0001 bundler/ruby/1.8/gems/rr-1.0.2/spec/api/dont_allow/dont_allow_after_stub_spec.rb
vim-jar-0.1.2 bundler/ruby/1.8/gems/rr-1.0.2/spec/api/dont_allow/dont_allow_after_stub_spec.rb
vim-jar-0.1.1 bundler/ruby/1.8/gems/rr-1.0.2/spec/api/dont_allow/dont_allow_after_stub_spec.rb
vim-jar-0.1.0 bundler/ruby/1.8/gems/rr-1.0.2/spec/api/dont_allow/dont_allow_after_stub_spec.rb
vim-jar-0.0.3 bundler/ruby/1.8/gems/rr-1.0.2/spec/api/dont_allow/dont_allow_after_stub_spec.rb
vim-jar-0.0.2 bundler/ruby/1.8/gems/rr-1.0.2/spec/api/dont_allow/dont_allow_after_stub_spec.rb
vim-jar-0.0.1 bundler/ruby/1.8/gems/rr-1.0.2/spec/api/dont_allow/dont_allow_after_stub_spec.rb
rr-1.0.2 spec/api/dont_allow/dont_allow_after_stub_spec.rb