Skip to content

Sugar test for monthly passes but does not work #10

@salex

Description

@salex

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions