Skip to content

Add assert_contains() as a new assertion#19

Open
pimterry wants to merge 3 commits intoztombol:masterfrom
pimterry:contains
Open

Add assert_contains() as a new assertion#19
pimterry wants to merge 3 commits intoztombol:masterfrom
pimterry:contains

Conversation

@pimterry
Copy link

@pimterry pimterry commented Dec 8, 2016

No description provided.

@pimterry
Copy link
Author

@ztombol Ping. Any interest in merging this?

@ztombol
Copy link
Owner

ztombol commented Feb 24, 2017

Sorry, I have a huge backlog. I'll take a look at it this or next weekend. 🙇

PS: Thanks for the medium article. 😄

@pimterry
Copy link
Author

No worries! No desperate hurry, just trying to make sure it doesn't stall.

Thanks for the testing tools 😄

@pimterry
Copy link
Author

@ztombol any thoughts on this?

@jasonkarns
Copy link
Contributor

Have you seen the "new" --partial and --regex matching options to the assert_output helper?

https://github.com/ztombol/bats-assert#partial-matching and https://github.com/ztombol/bats-assert#regular-expression-matching

These options probably post-date this PR, but curious if they solve your use cases?

@pimterry
Copy link
Author

I haven't used bats for anything any time recently, so I'm not sure I'm afraid!

The only clear difference is that you can assert on things other than command output, but depends how valuable that is to people. I'll leave this open, feel free to merge or close as you like.

Pierstoval pushed a commit to Pierstoval/bats-assert that referenced this pull request Jan 26, 2026
Extract assertions to separate files
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.

3 participants