runt icon indicating copy to clipboard operation
runt copied to clipboard

Sugar test for monthly passes but does not work

Open salex opened this issue 12 years ago • 0 comments

monthly_3rd_to_14th creates a REMonth object:

2.0.0-p247 :127 > m34 = monthly_3rd_to_14th
 => #<Runt::REMonth:0x00000104e4b628 @range="3".."14"> 

and passess the monthly sugar test, since you convert expected and actual to a string. Calling m34.include?(date) will not work. (looking for integer in string range)

I found this trying to add my negative_month offset and testing it. I changed

st_day, end_day = $1, $2
#to
st_day, end_day = $1.to_i, $2.to_i

and all test pass and monthly_3rd_to_14th works.

salex avatar Jul 30 '13 15:07 salex