Skip to content

Improve MemoizedHelpers#subject to work with Singleton

gitlab-qa-bot requested to merge github/fork/Spitsman/subject_singleton into master

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.

Merge request reports