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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need support for assert_contains, refute_contains, assert_starts_with, etc. #20

Open
yamaszone opened this issue Jun 2, 2017 · 3 comments

Comments

@yamaszone
Copy link

yamaszone commented Jun 2, 2017

@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.

@jasonkarns
Copy link
Contributor

@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)

@jasonkarns
Copy link
Contributor

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

@yamaszone
Copy link
Author

@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!

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

No branches or pull requests

2 participants