Sha256: 6f2cc6979e264d6f46de41353b42a0b8a42e19bf34bb4c75ee6f9c5bd34c5be4

Contents?: true

Size: 466 Bytes

Versions: 22

Compression:

Stored size: 466 Bytes

Contents

require File.dirname(__FILE__) + '/../../spec_helper.rb'

module Spec
  module Mocks
    describe "Example with stubbed and then called message" do
      it "should fail if the message is expected and then subsequently not called again" do
        mock_obj = mock("mock", :msg => nil)
        mock_obj.msg
        mock_obj.should_receive(:msg)
        lambda { mock_obj.rspec_verify }.should raise_error(Spec::Mocks::MockExpectationError)
      end
    end
  end
end

Version data entries

22 entries across 22 versions & 5 rubygems

Version Path
dchelimsky-rspec-1.1.11.4 spec/spec/mocks/stubbed_message_expectations_spec.rb
dchelimsky-rspec-1.1.11.5 spec/spec/mocks/stubbed_message_expectations_spec.rb
dchelimsky-rspec-1.1.11.6 spec/spec/mocks/stubbed_message_expectations_spec.rb
dchelimsky-rspec-1.1.11.7 spec/spec/mocks/stubbed_message_expectations_spec.rb
dchelimsky-rspec-1.1.12 spec/spec/mocks/stubbed_message_expectations_spec.rb
dchelimsky-rspec-1.1.99.1 spec/spec/mocks/stubbed_message_expectations_spec.rb
dchelimsky-rspec-1.1.99.2 spec/spec/mocks/stubbed_message_expectations_spec.rb
dchelimsky-rspec-1.1.99.3 spec/spec/mocks/stubbed_message_expectations_spec.rb
dchelimsky-rspec-1.1.99.4 spec/spec/mocks/stubbed_message_expectations_spec.rb
dchelimsky-rspec-1.1.99.5 spec/spec/mocks/stubbed_message_expectations_spec.rb
dchelimsky-rspec-1.1.99.6 spec/spec/mocks/stubbed_message_expectations_spec.rb
dchelimsky-rspec-1.1.99.7 spec/spec/mocks/stubbed_message_expectations_spec.rb
dchelimsky-rspec-1.1.99.8 spec/spec/mocks/stubbed_message_expectations_spec.rb
dchelimsky-rspec-1.1.99.9 spec/spec/mocks/stubbed_message_expectations_spec.rb
newbamboo-evented-rspec-1.1.12 spec/spec/mocks/stubbed_message_expectations_spec.rb
newbamboo-rspec-1.1.12 spec/spec/mocks/stubbed_message_expectations_spec.rb
rspec-1.1.12 spec/spec/mocks/stubbed_message_expectations_spec.rb
spree-0.6.0 vendor/plugins/rspec/spec/spec/mocks/stubbed_message_expectations_spec.rb
spree-0.7.1 vendor/plugins/rspec/spec/spec/mocks/stubbed_message_expectations_spec.rb
spree-0.7.0 vendor/plugins/rspec/spec/spec/mocks/stubbed_message_expectations_spec.rb