Emmanuel Oga’s Weblog

rspec 1.1.8 in `exit?’: undefined method `run?’ (rails 2.1.0)

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.

1 Respuesta para "rspec 1.1.8 in `exit?’: undefined method `run?’ (rails 2.1.0)"

what are you doing?

Escribe un comentario

About Me


Professional Software developer, amateur musician. Obsessed with finding the best algorithms for solving the problems nobody has.

My Profile

View Gustavo Emmanuel Oga's profile on LinkedIn

Recomendame

Recommend Me

Stats

  • 22,132 hits

Twitter

LocosXRails Conference