Sha256: 485acb5a4992edfa34fc76112176b30318966d8b6abe2bbfb6edc9ff15f8761a
Contents?: true
Size: 1.02 KB
Versions: 1
Compression:
Stored size: 1.02 KB
Contents
Feature: must_receive So that I can write accurate specifications As an RSpec user I want to be able to use #must_receive instead of #should_receive Scenario: #must_receive when expectation is met Given a file named "must_receive_met_spec.rb" with: """ require 'rspec' require 'rspec/must' describe Object do it 'receives a message' do o = double('object') o.must_receive :class o.class end end """ When I run `rspec must_receive_met_spec.rb` Then the example must pass Scenario: #must_receive when expectation is not met Given a file named "must_receive_not-met_spec.rb" with: """ require 'rspec' require 'rspec/must' describe Object do it 'receives a message' do o = double('object') o.must_receive :class end end """ When I run `rspec must_receive_not-met_spec.rb` Then the example must fail And the output must contain "received: 0 times"
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rspec-must-0.0.1 | features/must_receive.feature |