kasutaja
2008-Jun-06 06:23 UTC
[rspec-users] `exit?'': undefined method `run?'' for Test::Unit:Module (NoMethodError)?
Why am I getting this error if running from Netbeans or just from command line with executing blah_spec.rb? If I run with spec bla blah blah_spec.rb then it''s fine. . Finished in 0.264 seconds 1 example, 0 failures c:/ruby/lib/ruby/gems/1.8/gems/rspec-1.1.4/lib/spec.rb:27:in `exit?'': undefined method `run?'' for Test::Unit:Module (NoMethodError) from c:/ruby/lib/ruby/gems/1.8/gems/rspec-1.1.4/lib/spec/runner.rb:193:in `register_at_exit_hook'' from C:/projects/xpstuff/watir/src/list_sitt.rb:3 -- View this message in context: http://www.nabble.com/%60exit-%27%3A-undefined-method-%60run-%27-for-Test%3A%3AUnit%3AModule-%28NoMethodError%29--tp17685410p17685410.html Sent from the rspec-users mailing list archive at Nabble.com.
Daniel Hoey
2008-Sep-03 05:46 UTC
[rspec-users] `exit?'': undefined method `run?'' for Test::Unit:Module (
I had the same problem with some of my specs. Solved by adding require ''test/unit'' to the spec file. Not complete sure why this occurs but the Test::Unit.run? method is defined in test/unit.rb. kasutaja wrote:> Why am I getting this error if running from Netbeans or just from > command > line with executing blah_spec.rb? If I run with spec bla blah > blah_spec.rb > then it''s fine. > > . > > Finished in 0.264 seconds > > 1 example, 0 failures > c:/ruby/lib/ruby/gems/1.8/gems/rspec-1.1.4/lib/spec.rb:27:in `exit?'': > undefined method `run?'' for Test::Unit:Module (NoMethodError) > from > c:/ruby/lib/ruby/gems/1.8/gems/rspec-1.1.4/lib/spec/runner.rb:193:in > `register_at_exit_hook'' > from C:/projects/xpstuff/watir/src/list_sitt.rb:3-- Posted via http://www.ruby-forum.com/.
juuuser
2008-Sep-08 06:02 UTC
[rspec-users] `exit?'': undefined method `run?'' for Test::Unit:Module (
In that case my specs will be also run by Test::Unit and assertions/failures/blah count will be displayed. Not exactly what I want. Satish Gunnu wrote:> > I had the same problem with some of my specs. Solved by adding > > require ''test/unit'' > > to the spec file. Not complete sure why this occurs but the > Test::Unit.run? method is defined in test/unit.rb. >-- View this message in context: http://www.nabble.com/%60exit-%27%3A-undefined-method-%60run-%27-for-Test%3A%3AUnit%3AModule-%28NoMethodError%29--tp17685410p19366288.html Sent from the rspec-users mailing list archive at Nabble.com.