Added a failing test to show that mocking File.read_lines is currently broken#41
Added a failing test to show that mocking File.read_lines is currently broken#41ndbroadbent wants to merge 4 commits intowaterlink:masterfrom
Conversation
|
I did some digging in the Crystal stdlib and figured out that
Both of these define a So I changed the test to: And this fixed the original So it looks like there could be two ways of solving this:
(I would prefer the first option if that's possible.) I'm still working on the But it's surprising that this is so hard, because it's just a simple method defined on the File class. (But I'm doing something wrong!) Test currently fails because the method isn't mocked properly, so it tries to read a file that doesn't exist: P.S. The |
bd30e57 to
38342cb
Compare
This PR includes #40, which fixes most of the tests that were crashing on Crystal 0.31.1
This related spec is still failing: #37
So I think I'm running into the same issue with this case.
See also: #38