Sha256: 051983c3eebd4f97a030ee5b2578b896f231201aaa61877cfa4a8186235d4ab8
Contents?: true
Size: 603 Bytes
Versions: 38
Compression:
Stored size: 603 Bytes
Contents
Feature: Spy on an unstubbed method Using have_received on an unstubbed method will never pass, so rspec-mocks issues a helpful error message. Scenario: fail to verify a stubbed method Given a file named "failed_spy_spec.rb" with: """ruby describe "have_received" do it "raises a helpful error for unstubbed methods" do object = Object.new object.object_id object.should have_received(:object_id) end end """ When I run `rspec failed_spy_spec.rb` Then the output should contain "that method has not been stubbed"
Version data entries
38 entries across 38 versions & 8 rubygems