Loading ...
Sorry, an error occurred while loading the content.

Re: [XP] Unit tests & Databases

Expand Messages
  • Rob Park
    So I think I get how RoR AR works, but is there a standard TDD approach for it? Or how do you do that? My concern with AR is overcomplicating test classes
    Message 1 of 2 , Sep 4, 2007
    • 0 Attachment
      So I think I get how RoR AR works, but is there a standard TDD
      approach for it? Or how do you do that? My concern with AR is
      overcomplicating test classes due to my class having 2
      responsibilities: manage itself (biz logic) and its persistence.

      .rob.

      P.S. Sorry I hadn't seen your part 2 before my last post.

      --- In extremeprogramming@yahoogroups.com, "Phlip" <phlip2005@...>
      wrote:
      >
      > Just some brief observations: Everyone studying TDD vs databases
      should
      > learn how Ruby on Rails and ActiveRecord do it.
      >
      > Next, I bet everyone could connect to the same database and run all
      their
      > tests efficiently if each test case setUp() simply started a
      transaction
      > before preppings its "fixture" resources, and then discarded this
      > transaction in a tearDown().
      >
      > --
      > Phlip
      > http://www.oreilly.com/catalog/9780596510657/
      > "Test Driven Ajax (on Rails)"
      > assert_xpath, assert_javascript, & assert_ajax
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.