tag:blogger.com,1999:blog-15558048.post5496982923163262233..comments2023-10-12T09:10:31.269-04:00Comments on Modern Software Development Fun: Testing private methods in RSpecAnonymoushttp://www.blogger.com/profile/10695648911502574065noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-15558048.post-43672554145513215202012-08-02T17:08:03.427-04:002012-08-02T17:08:03.427-04:00I decided to create some public help methods that ...I decided to create some public help methods that forward to the private methods.<br /><br />Anyone using public methods like test_internalFunction is a bit silly, right?Anonymoushttps://www.blogger.com/profile/13752308196289206714noreply@blogger.comtag:blogger.com,1999:blog-15558048.post-61293776032777348902010-09-07T21:40:35.996-04:002010-09-07T21:40:35.996-04:00thanks so much.
actually before reading this arti...thanks so much. <br />actually before reading this article, I only know that :<br />1. no need to test private method.<br />2. if it's really need to do that, move the private method to another class.<br /><br />but however actually I found that almost every method should be tested, otherwise it's hard to write code for me. so there are many times I changed a private method to public to implement the unit test.<br /><br />really great and helpful! thanks so much! <br /><br />Also, I will find another way to test private method in original ruby unit test(as some of my projects don't use rspec). :-)Anonymousnoreply@blogger.com