Closed KurtPreston closed 9 years ago
Hey, great work with this! I've tried it against two projects and it worked almost flawlessly. I did encounter one error with the following line of code:
widgets.should =~ Widget.where('created_at > (?)', @time1 - 1.day).where('created_at < (?)', @time1 + 1.day)
This was erroneously translated to:
expect(widgets).to match(Widget.where('created_at > (?)', @time1 - 1.day).where('created_at < (?)', @time1 + 1.day))
However, this spec fails. I believe it should have used match_array instead of match. The following line works:
match_array
match
expect(widgets).to match_array(Widget.where('created_at > (?)', @time1 - 1.day).where('created_at < (?)', @time1 + 1.day))
Thanks for the report, and sorry for this late response :wink:
Hey, great work with this! I've tried it against two projects and it worked almost flawlessly. I did encounter one error with the following line of code:
This was erroneously translated to:
However, this spec fails. I believe it should have used
match_array
instead ofmatch
. The following line works: