Method test::unit::TestSuite#<<(test)

Discussion in 'Ruby' started by Robert Klemme, Aug 6, 2003.

  1. Hi,

    I suggest to change the definition of this method slightly:

    current:
    # Adds the test to the suite.
    def <<(test)
    @tests << test
    end

    proposed:
    # Adds the test to the suite.
    def <<(test)
    @tests << test
    self
    end

    This way we can do:

    class TS_MyTests
    def self.suite
    Test::Unit::TestSuite.new <<
    TC_MyFirstTests.suite <<
    TC_MoreTestsByMe.suite <<
    TS_AnotherSetOfTests.suite
    end
    end

    Regards

    robert
     
    Robert Klemme, Aug 6, 2003
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Bud Curtis

    Junit TestSuite Reporting Issue

    Bud Curtis, Nov 24, 2004, in forum: Java
    Replies:
    0
    Views:
    485
    Bud Curtis
    Nov 24, 2004
  2. Edvard Majakari
    Replies:
    4
    Views:
    913
    Edvard Majakari
    Feb 25, 2005
  3. VvanN
    Replies:
    5
    Views:
    767
    Phlip
    Apr 28, 2006
  4. billiejoex
    Replies:
    2
    Views:
    324
    billiejoex
    Sep 10, 2007
  5. Bill David
    Replies:
    2
    Views:
    398
    Arne Vajhøj
    Jun 18, 2008
  6. Johan Holmberg
    Replies:
    7
    Views:
    350
    Johan Holmberg
    Sep 15, 2003
  7. Bill Mosteller
    Replies:
    0
    Views:
    395
    Bill Mosteller
    Oct 22, 2009
  8. timr
    Replies:
    2
    Views:
    345
Loading...