Sha256: bc72244b796b98fc83fb5aa7d48ff366754463eb98506ef6e0a15c868b8dcc2f
Contents?: true
Size: 608 Bytes
Versions: 203
Compression:
Stored size: 608 Bytes
Contents
Doubles, stubs, and message expectations are all cleaned out after each example. This ensures that each example can be run in isolation, and in any order. ### `before(:each)` It is perfectly fine to set up doubles, stubs, and message expectations in a `before(:each)` hook, as that hook is executed in the scope of the example: before(:each) do @account = double('account') end ### Do not create doubles, stubs, or message expectations in `before(:all)` If you do, they'll get cleaned out after the first example, and you will be very confused as to what's going on in the second example.
Version data entries
203 entries across 149 versions & 26 rubygems
Version | Path |
---|---|
rspec-mocks-2.8.0.rc1 | features/Scope.md |
rspec-mocks-2.7.0 | features/Scope.md |
rspec-mocks-2.7.0.rc1 | features/Scope.md |