tag:blogger.com,1999:blog-581197352358126527.post1263006158926673153..comments2024-03-29T03:21:30.339-07:00Comments on japh(r) by Chris Strom: Testing After the Fact (git-scribe)Anonymoushttp://www.blogger.com/profile/00135361916531185929noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-581197352358126527.post-8803164028361469882011-08-16T05:04:56.439-07:002011-08-16T05:04:56.439-07:00Yah, I see what you're going for there. I'...Yah, I see what you're going for there. I'm not sure exactly how best to do something like this.<br /><br />The return value of the gen method is of very little consequence to this test. It is the canary in this coal mine of a test.<br /><br />What I am really interested in is the by-product of call to gen. I am really testing that the .epub file is created or that the .epub contains a .ncx file.<br /><br />In that case, I don't want to bury the method generating the by-product inside an assert. Admittedly, burying it inside an assignment isn't much better.<br /><br />I should probably split it out into separate tests. One to verify that it completes successfully. The other to verify that it contains the right stuff (with a check of the return value).Anonymoushttps://www.blogger.com/profile/00135361916531185929noreply@blogger.comtag:blogger.com,1999:blog-581197352358126527.post-10009681919997430792011-08-16T04:37:23.658-07:002011-08-16T04:37:23.658-07:00ret = @scribe.gen('epub')
assert_equal tru...ret = @scribe.gen('epub')<br />assert_equal true, ret<br />---<br />assert @scribe.gen('epub'), "unable to generate"bryanlhttps://www.blogger.com/profile/13982445713632074640noreply@blogger.comtag:blogger.com,1999:blog-581197352358126527.post-2191593831673821532011-08-16T04:36:43.683-07:002011-08-16T04:36:43.683-07:00This comment has been removed by the author.bryanlhttps://www.blogger.com/profile/13982445713632074640noreply@blogger.com