tag:blogger.com,1999:blog-12467669.post748558430569081909..comments2023-04-29T07:23:25.825-04:00Comments on Jay Fields' Thoughts: Rails: Unit Testing UpdateJayhttp://www.blogger.com/profile/14491442812573747680noreply@blogger.comBlogger4125tag:blogger.com,1999:blog-12467669.post-10800817298756331262007-02-23T08:58:00.000-05:002007-02-23T08:58:00.000-05:00pat: I read the entire thread (as of this moment) ...pat: I read the entire thread (as of this moment) and I like David's response: http://rubyforge.org/pipermail/rspec-users/2007-February/000791.html<BR/><BR/>If you believe, which I do, that you should not connect to a db in a unit test then you can't write a unit test for a method that calls to the db (via the framework).<BR/><BR/>Also, keep in mind that anytime you are using mocks you are generally specifying how not what. Sometimes it feels uglier than others, but you are always specifying the behavior. This means that mock tests will always be more brittle if the behavior of the class being mocked is changed.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-12467669.post-14041345878353061552007-02-23T07:53:00.000-05:002007-02-23T07:53:00.000-05:00jchris: intel mac minis (5 months old), 2 gigs of ...jchris: intel mac minis (5 months old), 2 gigs of ram, I believe.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-12467669.post-89227751428093726282007-02-23T03:21:00.000-05:002007-02-23T03:21:00.000-05:00What is your equipment like? I've been working hea...What is your equipment like? I've been working heavily with mocks (and avoiding the database most of the time), but my number are about 1/4 the speed you're showing.<BR/><BR/>Maybe it's my ancient powerbook.J Chris Ahttps://www.blogger.com/profile/11598260533932670972noreply@blogger.comtag:blogger.com,1999:blog-12467669.post-87370486231206917752007-02-22T20:43:00.000-05:002007-02-22T20:43:00.000-05:00Reading your posts made me wonder how you test stu...Reading your posts made me wonder how you test stuff like custom finders. I actually just asked about it on the rspec list today... http://rubyforge.org/pipermail/rspec-users/2007-February/000787.html I'd love it if you could check that out and comment.Anonymousnoreply@blogger.com