Hi I have a Ruby class with some constant variables using Date:
START_DATE = Date.current.at_beginning_of_month.in_time_zone + 2.days
LAST_DATE = Date.current.at_beginning_of_month.in_time_zone + 10.days
and I have some methods which uses this date inside like below:
Date.current.in_time_zone.between?(START_DATE, LAST_DATE)
in my rspec file I'm using Timecop.freeze
and it's breaking my tests.
Is there a workaround to use the same variable for most of my methods? or am I using this incorrectly?
I would appreciate any help!