Ruby on Rails
Wednesday, June 22, 2016
It's truly test driven development .. There is no way to guarantee a program to be bug free (Turing). Even if all your code is executed by tests, it is still not executed with all possible conditions. It seems I should want to write code that satisfies the testing requirement but I am not always sure that I would feel the most confident that it covers all cases and I can't always test all cases ..
On Wednesday, June 22, 2016 at 3:49:45 PM UTC-4, Stewart Mckinney wrote:
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 <jrub...@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-ta...@googlegroups.com .
To post to this group, send email to rubyonra...@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/014f8b69-a751-4993-8dcc-20680a48e837%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment