Ruby on Rails Wednesday, June 22, 2016

I hate to say it, but that grade might be warranted.

If you have a lot of error conditions you are anticipating in a function, you should probably unit test all of those error cases to make sure they handle the errors well. Otherwise how do you know you are handling them appropriately?

On Wed, Jun 22, 2016 at 3:25 PM, Jedrin <jrubiando@gmail.com> wrote:

 This is something I realized is that if you try to write more bullet proof code, it may have alot of extra checks in it. That may make it harder to test because there are more conditions. In theory your code is trying to cover cases that may or may not occur but it is trying to be more robust ... However, then when you run something like the simplecov gem - https://github.com/colszowka/simplecov If your code has various checks in it that are not tested because they are not typical, your code module will get a bad percentage mark for not being fully tested.

 

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/06cd4973-136c-4af4-947e-086f716105b4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CA%2BCQ9371QX5%2BqmCopW9957nJO%3DmuucBUSLv_iFaF7vdBKULAOw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment