I'm using require "singleton" to make a given class only be instantiated once. However, at the time of running the tests with rspec, I get the following error:
NoMethodError: private method 'new' called for MyClass.
I'm not instantiating the class with new
, but rather getting the reference to the object with MinhaClasse.instance
. How do I resolve this issue?