I’ve wrote a class method, which calls other class methods of the same class.
class Statistic
def self.do_something
#...
end
def self.update_statistic
Statistic.do_something
end
end
How do I test, that update_statistic calls do_something?
I use Rails 3 & rspec 2.
You should be able to set an expectation on
do_somethingand then callupdate_statisticdirectly.