【发布时间】:2011-03-23 11:40:33
【问题描述】:
假设我们有以下代码:
class Post < ActiveRecord::Base
def self.fix_published_times
where(:published => true, :published_at => nil).limit(5).each do |post
post.fix_published_at!
end
end
end
我应该如何指定 Post#fix_published__at! with should_receive?
【问题讨论】:
标签: ruby-on-rails-3 rspec arel