Re: [rspec-users] Singleton classes

2010-01-19 Thread Ashley Moran
On Jan 19, 2010, at 2:33 pm, Juanma Cervera wrote: > Yes, I mean the Singleton Pattern. > I am not an expert with OO, but I supposed this pattern was what best > fits my needs of a class that represent a unique resource in the system, > in this case it's something like a queue of jobs that I ha

Re: [rspec-users] Singleton classes

2010-01-19 Thread Juanma Cervera
Yes, I mean the Singleton Pattern. I am not an expert with OO, but I supposed this pattern was what best fits my needs of a class that represent a unique resource in the system, in this case it's something like a queue of jobs that I have to administrate in real time. Am I right? Maybe not, beca

Re: [rspec-users] Singleton classes

2010-01-19 Thread David Chelimsky
On Tue, Jan 19, 2010 at 6:03 AM, Juanma Cervera 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 cor

[rspec-users] Singleton classes

2010-01-19 Thread Juanma Cervera
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? Thanks Juanma -- Posted via