On Tue, Jan 19, 2010 at 6:03 AM, Juanma Cervera <li...@ruby-forum.com> wrote: > Hello > I am trying to spec a singleton ruby class, > And I am having a little trouble because my specs are not more isolated, > as I am getting the same instace of the class for all my examples. > > How should I do this.? > Which is the correct way of specing a singleton class?
I'm assuming you mean singleton as in the Singleton Pattern, as opposed to the singleton class of an object, yes? If so, you'll have to dup it or subclass it in your spec if you want to isolation. Why do you need a Singleton, though? David > > Thanks > Juanma > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > rspec-users mailing list > rspec-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users > _______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users