-
-
Notifications
You must be signed in to change notification settings - Fork 193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added cl-mock #392
added cl-mock #392
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was too lazy to go to the terminal and update my fork. So there is still this old commit that got merged already (gtwiwtg).
I had thought that GitHub is smart enough to realize this.
Do you think it's ok, or should I update my fork?
No worries, I've updated my fork. |
Could we choose one maybe? I thought mockingbird had more features, but actually they have the same set? Mockingbird allows to check that a function was called ( It seems they both do the difference between lexical and dynamic mocks. I find mockingbird's README way cleaner and the projects looks a tiny bit more lively (3 more stars, 13 more commits and its last commit is more recent by one year \o/ ). Does cl-mock do something more? Where is its pattern-matching thingy explained? And BTW, it still relies on and links to Optima which is deprecated. |
cl-mock can capture the call arguments and it allows to verify and decide for a return in the (answer (atom-feed:generate-feed feed-model)
(if (not (hash-table-p feed-model))
(cons :nok "Wrong input type")
(cons :ok "<feed")))
In mockingbird you have to setup separate But don't worry. We don't need to add it. I thought there could be two (it seems like they are the only ones). |
Cool. I leave this open. |
It seems that Mockingbird supports mocking methods (apart from trivial functions). Does cl-mock supports it too? |
AFAIK methods in Common Lisp are just implementations of generic functions.
|
While that is written in the readme, there is an issue that mentions this as a TODO feature. So I'm not sure. |
But it seems to work:
A method can be additionally defined and it still works:
|
btw: cl-mock was changed to use Trivia some time ago. |
@vindarel I tried both Mockdingbird and cl-mock and found something below:
Having said that, I would suggest selecting cl-mock over Mockingbird in the awesome-cl list and introduce cl-mock in the cookbook. What do you think? @mdbergmann Please correct me if I made any mistake. :-) |
@sheepduke |
Ok then, thank you for the detailed comparison. The added line could redirect to this discussion for more details I guess (or a future blog post/gist of yours). |
No description provided.