Sha256: 355c7c5506c5368671cc7da4c303069c8651dc19ebb9af92d258ad18bf5d43da
Contents?: true
Size: 667 Bytes
Versions: 7
Compression:
Stored size: 667 Bytes
Contents
Feature: Spec and test 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 match "expected :foo with (\"first\") but received it with ([\"second\"], [\"third\"])"
Version data entries
7 entries across 7 versions & 2 rubygems