diff --git a/test/support/assertions.rb b/test/support/assertions.rb index b672f57..83010a0 100644 --- a/test/support/assertions.rb +++ b/test/support/assertions.rb @@ -1,13 +1,19 @@ module Assertions - def assert_serial_update(soa, message=nil) + def assert_serial_update(soa) soa.reload - assert_difference 'soa.serial', 1, message do - yield - soa.reload - end + + old = soa.serial + yield + soa.reload + + assert soa.serial > old, "#{soa.serial} is not larger than #{old}!" + end + + def freeze_time(&block) + travel_to(Time.now, &block) end end ActiveSupport::TestCase.include Assertions