Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sugar test for monthly passes but does not work #10

Open
salex opened this issue Jul 30, 2013 · 0 comments
Open

Sugar test for monthly passes but does not work #10

salex opened this issue Jul 30, 2013 · 0 comments

Comments

@salex
Copy link

salex commented Jul 30, 2013

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant