Skip to content

Prevent user mistakes with missing #stub message

Compare
Choose a tag to compare
@dionisiydk dionisiydk released this 20 Feb 22:48
· 24 commits to master since this release
39dc9a6

Expectation methods (teacher API) are marked with pragma . Such methods are not allowed to be send to mocks to prevent user mistakes when it forget #stub message with defining an expectation for a mock.
So now following examples will fail with explicit error:

mock someMessage willReturn: 1.
mock will: [2].
mock stub willRaise: Error new