From: Fourchette Fourchette Date: 2010-08-27T02:20:16+09:00 Subject: getting fox unit test runner to work hi there, sorry if the question seems dump but... i have some unit tests that just work great $ test/ILV_unittest.rb Loaded suite test/ILV_unittest Started ........................ Finished in 0.060136 seconds. 24 tests, 141 assertions, 0 failures, 0 errors $ they work both in ubuntu 10 and cygwin (windows XP). i'm happy with this. reading the doc I could see that there was supposed to be some way to have the whoole thing handled by a nicer UI. indeed : $ test/ILV_unittest.rb --help Test::Unit automatic runner. Usage: test/ILV_unittest.rb [options] [-- untouched arguments] -r, --runner=RUNNER Use the given RUNNER. (c[onsole], f[ox], g[tk], g[tk]2, t[k]) -n, --name=NAME Runs tests matching NAME. (patterns may be used). -t, --testcase=TESTCASE Runs tests in TestCases matching TESTCASE. (patterns may be used). -I, --load-path=DIR[:DIR...] Appends directory list to $LOAD_PATH. -v, --verbose=[LEVEL] Set the output level (default is verbose). (s[ilent], p[rogress], n[ormal], v[erbose]) -- Stop processing options so that the remaining options will be passed to the test. -h, --help Display this help. Deprecated options: --console Console runner (use --runner). --gtk GTK runner (use --runner). --fox Fox runner (use --runner). so --runner=fox should do the trick. However : $ test/ILV_unittest.rb --runner=fox /usr/lib/ruby/1.8/test/unit/ui/fox/testrunner.rb:7:in `require': no such file to load -- fox (LoadError) from /usr/lib/ruby/1.8/test/unit/ui/fox/testrunner.rb:7 from /usr/lib/ruby/1.8/test/unit/autorunner.rb:37:in `require' from /usr/lib/ruby/1.8/test/unit/autorunner.rb:37 from /usr/lib/ruby/1.8/test/unit/autorunner.rb:214:in `[]' from /usr/lib/ruby/1.8/test/unit/autorunner.rb:214:in `run' from /usr/lib/ruby/1.8/test/unit/autorunner.rb:12:in `run' from /usr/lib/ruby/1.8/test/unit.rb:279 from test/ILV_unittest.rb:227 $ test/ILV_unittest.rb --runner=gtk /usr/lib/ruby/1.8/test/unit/ui/gtk/testrunner.rb:7:in `require': no such file to load -- gtk (LoadError) from /usr/lib/ruby/1.8/test/unit/ui/gtk/testrunner.rb:7 from /usr/lib/ruby/1.8/test/unit/autorunner.rb:29:in `require' from /usr/lib/ruby/1.8/test/unit/autorunner.rb:29 from /usr/lib/ruby/1.8/test/unit/autorunner.rb:214:in `[]' from /usr/lib/ruby/1.8/test/unit/autorunner.rb:214:in `run' from /usr/lib/ruby/1.8/test/unit/autorunner.rb:12:in `run' from /usr/lib/ruby/1.8/test/unit.rb:279 from test/ILV_unittest.rb:227 alexis@mtb-ubuntu-vdesk:/media/share_mes_projets/MATester_RB$ test/ILV_unittest.rb --runner=console Loaded suite test/ILV_unittest Started ........................ Finished in 0.059887 seconds. 24 tests, 141 assertions, 0 failures, 0 errors $ gem env RubyGems Environment: - RUBYGEMS VERSION: 1.3.5 - RUBY VERSION: 1.8.7 (2010-01-10 patchlevel 249) [i486-linux] - INSTALLATION DIRECTORY: /var/lib/gems/1.8 - RUBY EXECUTABLE: /usr/bin/ruby1.8 - EXECUTABLE DIRECTORY: /var/lib/gems/1.8/bin - RUBYGEMS PLATFORMS: - ruby - x86-linux - GEM PATHS: - /var/lib/gems/1.8 - /home/alexis/.gem/ruby/1.8 - GEM CONFIGURATION: - :update_sources => true - :verbose => true - :benchmark => false - :backtrace => false - :bulk_threshold => 1000 - REMOTE SOURCES: - http://gems.rubyforge.org/ $ gem list *** LOCAL GEMS *** fxruby (1.6.20) hoe (2.6.1) json_pure (1.4.6) rake (0.8.7) redcar (0.3.8.4) rubyforge (2.0.4) rubyzip (0.9.4) test-unit (2.1.1) test-unit-full (0.0.2) test-unit-notify (0.0.1) test-unit-runner-fox (0.0.1) test-unit-runner-gtk2 (0.0.1) test-unit-runner-tk (0.0.1) $ It should be mentioned that I tried under cygwin first (but compiled Fox lib failed unfortuantely so the fwruby gem would not install at all). thus the reason why i tried with ubuntu just in case. the weird thing is that i can have the fxruby example working on the very same Ubuntu setup... out of the blue i tried with gtk libs ==> faced same error see above and out of ideas, i saw some test-unit-runner-fox (the 0.0.1 wasn't very appealing but since nothing was working...). i tried with test-unit-runner-gtk but no luck i'm out of ideas anyone knows how i can get a unit test to be run with fox ? (or gtk) basically with another runner than console? thanks -- Posted via http://www.ruby-forum.com/.