Old Emmanuel Oga's Weblog (new one is at www.emmanueloga.com)

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

Posted in Uncategorized by emmanueloga on 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.


Una respuesta

Subscribe to comments with RSS.

  1. fiore said, on marzo 9, 2009 at 6:59 pm

    what are you doing?


Introduce tus datos o haz clic en un icono para iniciar sesión:

Logo de WordPress.com

Estás comentando usando tu cuenta de WordPress.com. Cerrar sesión /  Cambiar )

Google+ photo

Estás comentando usando tu cuenta de Google+. Cerrar sesión /  Cambiar )

Imagen de Twitter

Estás comentando usando tu cuenta de Twitter. Cerrar sesión /  Cambiar )

Foto de Facebook

Estás comentando usando tu cuenta de Facebook. Cerrar sesión /  Cambiar )


Conectando a %s

A %d blogueros les gusta esto: