Sha256: 42c936fba6052b400a271cd221dc87cf2ea4a91c7ca8bed2b0aa1210744bc072

Contents?: true

Size: 695 Bytes

Versions: 32

Compression:

Stored size: 695 Bytes

Contents

Feature: stub and mock together

  As an RSpec user
  I want to use stubs and mocks together

  Scenario: stub in before
    Given a file named "stub_and_mocks_spec.rb" with:
      """
      describe "a stub in before" do
        before(:each) do
          @messenger = mock('messenger').as_null_object
        end

        it "a" do
          @messenger.should_receive(:foo).with('first')
          @messenger.foo('second')
          @messenger.foo('third')
        end
      end
      """
    When I run "spec stub_and_mocks_spec.rb --format nested"
    Then the stdout should include "received :foo with unexpected arguments\n  expected: (\"first\")\n       got: ([\"second\"], [\"third\"])"

Version data entries

32 entries across 32 versions & 11 rubygems

Version Path
rspec-instructure-1.3.3 features/mocks/mix_stubs_and_mocks.feature
radiant-1.0.0 ruby-debug/ruby/1.8/gems/rspec-1.3.2/features/mocks/mix_stubs_and_mocks.feature
rspec-1.3.2 features/mocks/mix_stubs_and_mocks.feature
rspec-1.3.1 features/mocks/mix_stubs_and_mocks.feature
rspec-1.3.1.rc features/mocks/mix_stubs_and_mocks.feature
rspec-1.3.0 features/mocks/mix_stubs_and_mocks.feature
hubbub-0.0.11 lib/vendor/plugins/rspec/features/mocks/mix_stubs_and_mocks.feature
hubbub-0.0.10 lib/vendor/plugins/rspec/features/mocks/mix_stubs_and_mocks.feature
hubbub-0.0.9 lib/vendor/plugins/rspec/features/mocks/mix_stubs_and_mocks.feature
hubbub-0.0.8 lib/vendor/plugins/rspec/features/mocks/mix_stubs_and_mocks.feature
hubbub-0.0.6 lib/vendor/plugins/rspec/features/mocks/mix_stubs_and_mocks.feature
simple-templater-0.0.1.4 gems/gems/rspec-1.2.9/features/mocks/mix_stubs_and_mocks.feature
media-path-0.1.2 vendor/rspec/features/mocks/mix_stubs_and_mocks.feature
simple-templater-0.0.1.3 vendor/rspec/features/mocks/mix_stubs_and_mocks.feature
pupu-0.0.2.pre vendor/rspec/features/mocks/mix_stubs_and_mocks.feature
media-path-0.1.1.pre vendor/rspec/features/mocks/mix_stubs_and_mocks.feature
simple-templater-0.0.1.2 vendor/rspec/features/mocks/mix_stubs_and_mocks.feature
media-path-0.1.1 vendor/rspec/features/mocks/mix_stubs_and_mocks.feature
simple-templater-0.0.1.1 vendor/rspec/features/mocks/mix_stubs_and_mocks.feature
pupu-0.0.2 vendor/rspec/features/mocks/mix_stubs_and_mocks.feature