back2dos / tinkerbell

MIT License
83 stars 8 forks source link

Added sureOfFailure() for those of us who prefer failure to success #57

Closed jasononeil closed 5 years ago

jasononeil commented 11 years ago

Added sureOfFailure()

Basically to help with unit testing. You can verify that an API fails as expected under certain conditions with a similarly short syntax to checking that it passes as expected.

Feel free to decline if it is against your tastes. But I thought if it's useful to me it might be useful to others.

back2dos commented 11 years ago

If unit testing is the main motivation, I don't believe this should be added to Outcome itself.

It would be more appropriate to bundle this with whatever test framework one uses.

jasononeil commented 11 years ago

Fair point, I'll do it that way then...

I do appreciate that it was easier to send a pull request than to figure out how to phrase this as a question. Thanks for the response :)

On Tue, Aug 20, 2013 at 10:02 PM, Juraj Kirchheim notifications@github.comwrote:

If unit testing is the main motivation, I don't believe this should be added to Outcome itself.

It would be more appropriate to bundle this with whatever test framework one uses.

— Reply to this email directly or view it on GitHubhttps://github.com/back2dos/tinkerbell/pull/57#issuecomment-22946893 .

back2dos commented 11 years ago

Sure thing ;)

On Tue, Aug 20, 2013 at 4:25 PM, jasononeil notifications@github.comwrote:

Fair point, I'll do it that way then...

I do appreciate that it was easier to send a pull request than to figure out how to phrase this as a question. Thanks for the response :)

On Tue, Aug 20, 2013 at 10:02 PM, Juraj Kirchheim notifications@github.comwrote:

If unit testing is the main motivation, I don't believe this should be added to Outcome itself.

It would be more appropriate to bundle this with whatever test framework one uses.

— Reply to this email directly or view it on GitHub< https://github.com/back2dos/tinkerbell/pull/57#issuecomment-22946893> .

— Reply to this email directly or view it on GitHubhttps://github.com/back2dos/tinkerbell/pull/57#issuecomment-22948520 .