-
Notifications
You must be signed in to change notification settings - Fork 23
Add pork and bacon #65
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
base: master
Are you sure you want to change the base?
Conversation
|
What is the reason for either of these beat minitest or test unit? |
|
Sorry for my phrase if it's confusing. Bacon was inspired by RSpec, and Pork was inspired by Bacon. I don't know what other people would think, but to me, the advantage of this kind of libraries is that we could easily write nested tests, sharing before/after blocks easily. Also, using closures is sometimes more convenient. Writing test_this_is_an_apple is also more tedious. I know that there's minitest/spec, but I have never tried it so I can't really say. Maybe using it would be better than bacon or pork or rspec. I should probably try some day. As for the As for production... I am not sure why one would do so in production. I do have something like this though: raise "Assert a = b" unless a == bThis is good enough for me on production rather than using some fancy testing libraries. |
|
I don't mind adding a small testing lib. So 👍 |
|
Rspec has moved away from the should syntax to avoid monkey patching and is now using the expect. Seems like merging in Bacon makes sense, I'm less convinced of Pork. Any reason this isn't merged in yet? |
|
Could you let me know why you're less convinced of Pork? I don't know why this isn't merged. |
|
There are two reasons. The first is line count. 327 vs 896. To me, micro is ~500 lines. The other is that pork allows for monkey patching. I saw that you could avoid it by not requiring it, so that is a positive direction. Honestly, I'd be in favor of merging this with both of them, than just have it continue to sit out here. |
|
Both bacon and pork have optional codes (plugins or different formatters), and some stuffs in pork won't load by default. I should probably extract plugins from pork, but maybe not now though. Frankly it's a bit ironic. Pork used to only have 250 lines of code... Thanks for the feedback. @solnic ping? Should we merge this, or make some changes, or close this? |
Pork -- Simple and clean and modular testing library.
Bacon reimplemented around 250 lines of code.