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

Allow #must_be And #wont_be to take one argument for query methods. #31

Closed
metaskills opened this issue Aug 26, 2011 · 3 comments
Closed
Assignees

Comments

@metaskills
Copy link

It might be kind of cool to do something like this.

@user.must_be :valid?

I know this would be equal to.

assert user.valid?

But it would be kind of nice to get the pretty output message given be supporting methods like #assert_operator. So I am suggesting that I could do a patch that would check the arity of the method and if only one is given and that method is a query method (ending in a "?") then it would do something like this.

assert o1.__send__(op), msg

Thoughts?

@justinko
Copy link

Couple more of these and you'll have RSpec! :)

@metaskills
Copy link
Author

LOL. For the record, I have never used RSpec nor want to.

But this did seem like a small neat idea. Besides, it would make for another awesome release note along the lines of TestCase.i_suck_and_my_tests_are_order_dependent! :)

@ghost ghost assigned zenspider Aug 26, 2011
@zenspider
Copy link
Collaborator

Done. Thanks.

@minitest minitest locked and limited conversation to collaborators May 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

3 participants