Skip to content

Instantly share code, notes, and snippets.

View anhtranEH's full-sized avatar
🏠
Working from home

Anh Tran anhtranEH

🏠
Working from home
  • Winnipeg
View GitHub Profile
@palkan
palkan / factory_doctor.rb
Created March 27, 2017 15:42
FactoryDoc: detect useless data generation in tests
module FactoryGirl
module Doctor
module FloatDuration
refine Float do
def duration
t = self
format("%02d:%02d.%03d", t / 60, t % 60, t.modulo(1) * 1000)
end
end
end