I have a class that have self methods.
Class X < ActiveRecord::Base
self.do_something { puts ‘do something’ }
end
The model spec uses Factory Girl so an instance is created on the class.
When run rspec, do_something is not recognized.
How do I access X.do_something in rspec? Also, please provide an
example of a small test (i.e., expect) with do_something.
Thanks!