23 May
2016
23 May
'16
3:23 a.m.
On May 22, 2016, at 9:29 PM, Vinnie Falco
wrote: Can someone please explain what I am missing? What is the benefit of macros to declare functions?
So you don’t have to write the `run()` function. You just declare the function and it auto-registers it. The Prove library actually can auto-register cases without using a macro, though, which is nice when you want to create parameterized test cases.
What is my framework missing?
Well, the `expect` function can’t report back the file and line number where it failed nor the expression that caused it to fail and what values was given to it. This is really nice when using something like CI. I see no problem or disadvantage when using the macros, that they need to be avoided.