spec/helpers/time.rb in rack-oauth2-1.2.1 vs spec/helpers/time.rb in rack-oauth2-1.2.2

- old
+ new

@@ -1,14 +1,16 @@ class Time class << self - def now_with_fixed_time - if @fixed_time - @fixed_time.dup - else - now_without_fixed_time + module NowWithFixedTime + def now + if @fixed_time + @fixed_time.dup + else + super + end end end - alias_method_chain :now, :fixed_time + prepend NowWithFixedTime def fix(time = Time.now) @fixed_time = time yield ensure