From: dblack@... Date: 2007-08-11T03:07:21+09:00 Subject: Re: Unwanted behavior with "define" method an Test::Unit Hi -- On Sat, 11 Aug 2007, Collin Miller wrote: > I'm using "define_method" to build some unit test helpers. > > They look as such: > > class Test::Unit::TestCase > def self.name_of_test_helper > define_method("test_whatever_for_#{custom_name}") { > assert something_about(custom_name) > } > end > end > > When I run my tests I get pages and pages of this: > > ./test/model_helper.rb:7: warning: multiple values for a block > parameter (0 for 1) > from ./test/unit/../test_helper.rb:54 > ./test/model_helper.rb:7: warning: multiple values for a block > parameter (0 for 1) > from ./test/unit/../test_helper.rb:53 > > Everything works out just fine, the tests test what I want them to > test. I just don't want all these errors. What exactly is on the lines mentioned in the error messages? David -- * Books: RAILS ROUTING (new! http://www.awprofessional.com/title/0321509242) RUBY FOR RAILS (http://www.manning.com/black) * Ruby/Rails training & consulting: Ruby Power and Light, LLC (http://www.rubypal.com)