Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add block syntax for sequences #631

Merged
merged 1 commit into from
Nov 18, 2023
Merged

Conversation

floehopper
Copy link
Member

@floehopper floehopper commented Nov 18, 2023

All expectations defined within the block are constrained by the sequence.

For example, the following requires that Egg#crack must be called 1st, Egg#fry must be called 2nd, and Egg#eat must be called 3rd:

egg = mock('egg')
sequence('breakfast') do
  egg.expects(:crack)
  egg.expects(:fry)
  egg.expects(:eat)
end

Closes #61 (only 11 years late! 馃槀)

@floehopper floehopper force-pushed the block-syntax-for-sequences branch 2 times, most recently from 0326c49 to 7f0eb02 Compare November 18, 2023 11:08
All expectations defined within the block are constrained by the
sequence.

For example, the following requires that Egg#crack must be called 1st,
Egg#fry must be called 2nd, and Egg#eat must be called 3rd:

    egg = mock('egg')
    sequence('breakfast') do
      egg.expects(:crack)
      egg.expects(:fry)
      egg.expects(:eat)
    end

Closes #61 (only 11 years late!)
@floehopper floehopper merged commit 93fdffd into main Nov 18, 2023
16 checks passed
@floehopper floehopper deleted the block-syntax-for-sequences branch November 18, 2023 11:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide block syntax for sequences
1 participant