2007-12-04から1日間の記事一覧
class AgentTest < Test::Unit::TestCase def test_notice Time.class_eval do class << self alias_method :real_now, :now end def self.mock_now @current_time end def self.mock!(time) class << Time; alias_method :now, :mock_now; end @current_tim…