Skip to content

Conversation

@Chemaclass
Copy link
Member

@Chemaclass Chemaclass commented May 30, 2025

πŸ“š Description

Currently there is no way to assert different param values to a test double

πŸ”– Changes

  • Added support for specifying which call to assert in assert_have_been_called_with

βœ… To-do list

  • I updated the CHANGELOG.md to reflect the new feature or fix
  • I updated the documentation to reflect the changes

πŸ§ͺ Example

function test_spy_called_with_different_arguments() {
  spy ps

  ps first_a first_b
  ps second

  assert_have_been_called_with "first_a first_b" ps 1
  assert_have_been_called_with "second" ps 2
}

@Chemaclass Chemaclass self-assigned this May 30, 2025
@Chemaclass Chemaclass added the enhancement New feature or request label May 30, 2025
@Chemaclass Chemaclass merged commit ca71c26 into main May 30, 2025
13 checks passed
@Chemaclass Chemaclass deleted the chore/spy-been-called-diff-args branch May 30, 2025 23:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants