ztombol/bats-assert

Need support for assert_contains, refute_contains, assert_starts_with, etc.

yamaszone opened this issue · 3 comments

@ztombol Since jasonkarns/bats-assert has been deprecated in favor of this repository, can you please add support for some of the handy assertions in jasonkarns/bats-assert such as assert_contains, refute_contains, assert_starts_with, etc. to make this repository a super set of jasonkarns/bats-assert? This will help users who have already started with jasonkarns/bats-assert migrate easily to this. Please let me know if you would like to get a pull request for this.

@yamaszone what are your thoughts on assert_success? Current implementation in this repo only checks status. in my lib, assert_success asserts a 0 status code and optionally asserts the output (if provided)

I'm trying to decide if my fork of this repo (intending to replace my old bats-assert lib) should follow my old implementation or this one. (In this repo, to assert the status code and output requires two separate assertions)

Migration guide from jasonkarns/bats-assert (v1.1.1) to my fork of this repo (v2.0.0): https://github.com/jasonkarns/bats-assert-1/wiki/Migrating-from-v1.1.1

@jasonkarns Really glad to see your fork! We ended up sticking to your original v1-bats-assert which was trivial to integrate with BATS following your Installation instructions. Would be great if you can improve the installation instruction in your fork to address the deficiency of this repo.

in my lib, assert_success asserts a 0 status code and optionally asserts the output (if provided)

The above is highly desirable and optimal as it doesn't need two separate steps to assert status code and output. It would be great if you keep the behavior same as your original implementation in your v2.0.0 fork.

Looking forward to seeing your enhancements!