Re:Going Beyond Code to Become a Better Programmer
by spinningarrow on Wednesday June 10, 2015 @04:15AM
(#9690629)
Why can't you mock the function? Mocks aren't specific to classes.
Re:Going Beyond Code to Become a Better Programmer
by MichaelGG on Wednesday June 10, 2015 @05:50AM
(#9690889)
If you're passing an object in, you can just as easily pass in a function.
Though I was explicitly referring to the case where the code is literally rewriting static functions into objects without using any actual OO features - just adding extra noise.
(ok, you can use a fake smtp server, but it makes tests more complex, imo)