Addendum: I'm using rspec 1.3.0, rspec-rails 1.3.2 and ruby 1.9.1p129
On Feb 22, 8:45 pm, Harm <[email protected]> wrote: > Hi, > > I have an issue with rSpec when spec'ing a module. The module in > question looks like this: > > module Sheep > def self.sound > @sound ||= produce_sound() > end > end > > This module is used all around the application (and corresponding > specs) and somehow values of @sound leak between each spec. The only > way I found to fix it is to manually set the instance variable (with > instance_variable_set) to nil. Obviously this is Bad. Is there a way > to do this globally or better yet to prevent this? > > With kind regards, > Harm > > _______________________________________________ > rspec-users mailing list > [email protected]http://rubyforge.org/mailman/listinfo/rspec-users _______________________________________________ rspec-users mailing list [email protected] http://rubyforge.org/mailman/listinfo/rspec-users
