Improve MemoizedHelpers#subject to work with Singleton
Created by: Spitsman
I faced some troubles while testing my class with included Singleton method. I passed MyClass
that includes Singleton to RSpec#describe
, so I got NoMethodError: private method 'new' called for MyClass:Class
when I tried to call subject
inside my spec. So I decided to improve subject
method to work with Singleton.