Skip to content

Simplify implementation of consecutive return values.

gitlab-qa-bot requested to merge remove_consecutive into master

Created by: myronmarston

There's no need to track extra instance variable state (e.g. @consecutive); instead, the implementation lambda can just do the right thing.

This also fixes #217 (closed). Previously, message_expectation got confused when it was in consecutive mode (due to being stubbed with multiple return values) and then got mocked with a single return value. This simplified implementation fixes this bug.

@alindeman -- can you code review this, please?

Merge request reports