[rspec-users] A better way to stub out constants

Shane Mingins smingins at elctech.com
Wed Oct 31 17:59:07 EDT 2007

On 29/10/2007, at 11:27 AM, Ashley Moran wrote:
> But then it keeps nagging me:
>    /spec/celestial/engine/connections/sqlite_connection_spec.rb:14:
>    warning: already initialized constant SQLite3

Similar to my MiddleMan stub .... I used

class Object;  remove_const :MiddleMan; end

Not sure how kosha it is?

More information about the rspec-users mailing list