Fewer duplicate specs for Kernel methods#1376
Conversation
|
This seems a nice simplification, most Kernel methods are just There seems to be no easy way to prove they are the same, except maybe via their That's only OK if the returned I think for Kernel methods it's fine enough to check that there is a private instance method and a public singleton method of the same name, and only test one of them, and assume the other with the same name does the same. So here we'd test only |
4358599 to
cc64349
Compare
|
Turns out that most already only tested a single variant. It's about 700 fewer specs overall, which I assume were mostly caused by I've added private/public checks to all, which is the only observable effect of |
eregon
left a comment
There was a problem hiding this comment.
Great cleanup, thank you, just a few nits
cc64349 to
35bf536
Compare
Currently, some specs are run for both instance and singleton method This moves specs to run just on instance methods, and simply checks if the singleton method exists
35bf536 to
a498a67
Compare
Currently it checks that
Kernel.method==Object#methodby running specs twice. But the Kernel methods are just mixed into Object, so we should be able to assert that instead.Draft for now. I think this still asserts the same thing, but do let me know if I should do the same for the other kernel methods/if I'm missing something/it can be asserted in a better way.