ApprovalTests.Ruby
ApprovalTests.Ruby copied to clipboard
Update readme
I was browsing around the code and am amazed at the amount of functionality which I didn't see from the readme. I think it would be really worthwhile to update the readme with the functionality at least, even if it isn't very well written/with lots of examples for now. I really think this is a great gem, and it apparantly is even better than I thought :)
I think you're right that the README could use more examples.
Could some of the test-cases be a basis for the examples?
Yes, I think that would work pretty well :) Also the CLI should be documented (I was totally surprised that that existed ;) ).
Yes, good call!
Wondered about this today, but any reason for not following -i/-f semantics? I'd say -i should do -ask true, -f should do -ask false, and the default is up to you.
Is that --interactive
and --force
? How is --force
the same as "don't ask, do nothing"?
Ah sorry, I didn't read the updated readme yet. You're right of course. In that case --force is the option I'm missing ;)
Actually, now I think about it, 'verify --ask false' is a strange name for 'diff'. When you call verify with ask I'd say you're not really verifying. What about
-
approvals diff
==approvals verify --ask false
-
approvals verify
==approvals verify --ask true
-
approvals verify -f
==echo -e "y\ny\ny\n" | approvals verify --ask true
I might be missing something though, because I only use the default verifyer, and not the vimdiff, but I expect this would work the same in that case right?
(on a sidenote, any reason you use -a in your vim-mapping? That's the default, right?)
Actually, now I think about it, 'verify --ask false' is a strange name for 'diff'.
Yeah that's fair, but I don't like the syntax:
$ approvals diff --diff vimdiff
I agree that if we have an approvals diff
that never asks, it makes sense to have approvals verify
that always asks.
As for the third suggestion, I can imagine a use case where you would want to automatically accept the new output.
(on a sidenote, any reason you use -a in your vim-mapping? That's the default, right?)
I think what I originally intended was a flag that is true if present, false if absent. Looking at it again, I totally screwed that up.
approvals view?
Oooh, I like that!