Sha256: daa99963d5043d1b4abce11b5cdc503a088ba03f97375017a32c9948d1829780
Contents?: true
Size: 727 Bytes
Versions: 4
Compression:
Stored size: 727 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: """ require 'rspec/expectations' Rspec.configure do |config| config.mock_framework = :rspec end describe "a stub in before" do before(:each) do @messenger = double('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 "rspec stub_and_mocks_spec.rb -fs" Then I should see "received :foo with unexpected arguments"
Version data entries
4 entries across 4 versions & 1 rubygems