Posteado por: emmanueloga en: Octubre 16, 2008
I had to add this to the bottom of my spec_helper.rb:
self.class.send :remove_const, "Test" if defined? Test
to avoid this error when running my specs:
...
Finished in 0.064605 seconds
1 example, 0 failures, 1 pending
/usr/lib/ruby/gems/1.8/gems/rspec-1.1.8/lib/spec.rb:25:in `exit?’: undefined method `run?’ for Test::Unit:Module (NoMethodError)
from /usr/lib/ruby/gems/1.8/gems/rspec-1.1.8/lib/spec/runner.rb:193:in `register_at_exit_hook’
…
Fake update
(because I found this while writing this post) : Lighthouse Ticket describing the problem.
A somehow less ugly solution is to require 'spec' after you required your library code.
Marzo 9, 2009 a 6:59 pm
what are you doing?