Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Method test::unit::TestSuite#<<(test)

Reply
Thread Tools

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

 
 
Robert Klemme
Guest
Posts: n/a
 
      08-06-2003

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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
method def in method vs method def in block Kyung won Cheon Ruby 0 11-21-2008 08:48 AM
invoke a method by reflection£¨the method's parameters can not be ArrayList? jerry051 ASP .Net 2 08-02-2005 10:35 AM
BC30289: Statement cannot appear within a method body. End of method assumed. Carlos Oliveira ASP .Net 0 08-19-2004 07:51 PM
Difference between Delete method and RemoveRow method CW ASP .Net 0 04-01-2004 01:07 AM
ASP.NET: BC30289: Statement cannot appear within a method body. End of method assumed. Mike Wilmot ASP .Net 0 12-15-2003 07:49 PM



Advertisments