oops, forgot to mention you also need this require: require 'test/unit/ui/console/testrunner'
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Lillis, Dara Sent: Thursday, June 08, 2006 10:51 AM To: wtr-general@rubyforge.org Subject: Re: [Wtr-general] Test::Unit Reports? two obvious problems: you need to require reporter: require 'test/unit/ui/reporter' and you should require (and add to the suite) the class TC_1, not the test method tc_1 as an aside, you can create your directory without requiring fileutils using this single line: Dir.mkdir('build/report') -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Adrian Rutter Sent: Thursday, June 08, 2006 10:33 AM To: wtr-general@rubyforge.org Subject: Re: [Wtr-general] Test::Unit Reports? Hi, Please forgive my ignorance of unit test suites I have successfully installed Test::Unit::Reporter in my Ruby folder ruby setup.rb config ruby setup.rb install I have created two unit tests that are exactly the same apart from their class and method name class TC_1 def test_tc_1 class TC_2 def test_tc_2 require 'test/unit' class TC_1 < Test::Unit::TestCase def test_tc_1 start_browser('http://gbahevm07l15:9081/wps/portal') assert($ie.contains_text('Welcome')) $ie.close end end This is an attempt to create a unit test suite require 'test/unit' require 'tc_1' require 'tc_2' class TS_MyTests suite = Test::Unit::TestSuite.new suite << tc_1.suite suite << tc_2.suite require 'fileutils' FileUtils.mkdir_p 'build/report' Test::Unit::UI::Reporter.run(suite, 'build/report') end The errors I am receiving are: " undefined local variable or method `tc_1' for TS_MyTests:Class (NameError)" " uninitialized constant Test::Unit::UI::Reporter (NameError)" Can anyone please point me in the right direction? Thank You Aidy ------------------------------------------------------------------------ --------------------------------------- This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system. If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person. ------------------------------------------------------------------------ --------------------------------------- _______________________________________________ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general