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

Re: [XP] What's up with Rails?

Expand Messages
  • J. B. Rainsberger
    ... I characterize my problems this way: I ve learned over the last half-decade or so how to test layered architectures with a combination of Contract Tests
    Message 1 of 55 , Dec 1, 2006
    • 0 Attachment
      Shane Mingins wrote:

      > On 11/30/06, Phlip <phlip2005@... <mailto:phlip2005%40gmail.com>>
      > wrote:
      > > If Rails had more true test-first in its core,
      > > then your new tests cases would be easier to write first, too.
      >
      > Not quite sure what you mean by this .. could u expand/explain ... and
      > in English ;-)
      >
      > What I found was that it was so easy to write some code and get the
      > (manual) feedback that it was working ... and then I had to actually
      > force myself to write the tests. Now I think some of this was because
      > I was learning both Rails and Ruby as I was going so I did not know
      > how to write the test first. One book that would be useful is TDD
      > with Rails ;-) There was a discussion (I think on the JUnit group)
      > where Joe Rainsberger was having difficulty applying his TDD approach
      > from Java to Rails (I hope I have not misrepresented him on that ...
      > Joe,plse correct me if I have).

      I characterize my problems this way: I've learned over the last
      half-decade or so how to test layered architectures with a combination
      of Contract Tests and Interaction Tests, and mostly in Java. Now that
      I'm writing Rails applications, it's a new world, and many of the things
      that I've learned in Java/J2EE don't seem to apply directly to Rails,
      most notably injecting dependencies. Now it could just be that I'm still
      learning the ropes with Rails and that all this will become clear soon,
      but given that Rails instantiates more things for me and gives me less
      control over how to configure them (so far as I've seen so far), so I
      don't know how to test-drive a controller effectively yet, without
      writing what are in effect integration tests.

      The good news is that I'm getting some help in this direction, so
      perhaps I'll know better what to do in the coming months.
      --
      J. B. (Joe) Rainsberger :: http://www.jbrains.ca
      Your guide to software craftsmanship
      JUnit Recipes: Practical Methods for Programmer Testing
      2005 Gordon Pask Award for contribution Agile Software Practice
    • Kent Beck
      Charlie, Having coined the phrase, I can speak with a fair amount of certainty that test-first has always been a part of TDD. When I first started writing
      Message 55 of 55 , Jan 12, 2007
      • 0 Attachment
        Charlie,

        Having coined the phrase, I can speak with a fair amount of certainty that
        test-first has always been a part of TDD. When I first started writing tests
        first, I focused on that aspect. When I started writing the TDD book, I
        realized that what I did was really the combination of test-first and
        incremental design, and that either component technique could be used on its
        own.

        Regards,

        Kent Beck
        Three Rivers Institute


        _____

        From: extremeprogramming@yahoogroups.com
        [mailto:extremeprogramming@yahoogroups.com] On Behalf Of Charlie Poole
        Sent: Tuesday, January 09, 2007 3:11 PM
        To: extremeprogramming@yahoogroups.com
        Subject: RE: [XP] Re: What's up with Rails?



        > > >using automated tests to drive all aspects of development, at all
        > > >scales.
        >
        > Not so many years ago, the term TDD didn't necessarily imply
        > "test- first". Fortunately, like other agile concepts and
        > practices, ideas about just what TDD "is" have evolved over
        > time. Today, TDD implies test-first. There is no need to
        > invent another TLA to describe test- first development.

        Interesting... In my own personal experience, I've only run into
        the notion of TDD without doing the tests first fairly recently,
        as an error in interpretation on the part of those who weren't
        around when TDD grew - as I believe it did - out of test-first.

        As a matter of historical curiosity, I'd love to see some
        examples of the early use of TDD without "firstness"

        Charlie







        [Non-text portions of this message have been removed]
      Your message has been successfully submitted and would be delivered to recipients shortly.