tag:blogger.com,1999:blog-12467669.post115703881386731180..comments2023-04-29T07:23:25.825-04:00Comments on Jay Fields' Thoughts: Ruby Asserting Equality with TrueJayhttp://www.blogger.com/profile/14491442812573747680noreply@blogger.comBlogger4125tag:blogger.com,1999:blog-12467669.post-1157822370731462902006-09-09T13:19:00.000-04:002006-09-09T13:19:00.000-04:00In C++ you can use a macro to define the assertion...In C++ you can use a macro to define the assertion so when the assertion fails, you can print out the textual representation of the test. Do you think something similar would be natural enough in Ruby, via an assertion wrapping around eval?Adam Rosienhttps://www.blogger.com/profile/06590504956582245789noreply@blogger.comtag:blogger.com,1999:blog-12467669.post-1157820401267309442006-09-09T12:46:00.000-04:002006-09-09T12:46:00.000-04:00Hello Bill,Thanks, I've updated the entry.Hello Bill,<BR/>Thanks, I've updated the entry.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-12467669.post-1157815334872871622006-09-09T11:22:00.000-04:002006-09-09T11:22:00.000-04:00Hi Jay,Bill here.'Comment boolean asserts' is prob...Hi Jay,<BR/><BR/>Bill here.<BR/><BR/><A HREF="http://www.williamcaputo.com/archives/000238.html" REL="nofollow">'Comment boolean asserts'</A> is probably the entry you were referring to.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-12467669.post-1157609244417842212006-09-07T02:07:00.000-04:002006-09-07T02:07:00.000-04:00On a connected subject, I always use assertEquals ...On a connected subject, I always use assertEquals rather than assertTrue for my boolean assertions tests in Java and C# (no ruby yet sorry) because I find the <BR/><BR/><I>expected <true><BR/>but was <false></I><BR/><BR/>much more explicit than a simple<BR/><BR/><I>AssertionException.</I><BR/><BR/>Also, I find it easier it refactor and reuse the assertions where i can simply pull the expected boolean value out as a parameter.srushtihttps://www.blogger.com/profile/12120148008897342844noreply@blogger.com