shellspec
shellspec copied to clipboard
Sharing mocks between specs
How do I go about defining a command-based mock that can be shared between *_spec.sh files?
@kyrofa, I am wondering myself. Have you had any success by now? I am struggling with function-based commands though
Did you tried to import the mock from another file?
I ultimately ended up (ab)using support commands for this, effectively writing my own mocks. Not ideal, but it works okay.
Did you tried to import the mock from another file?
I'm afraid I don't remember at this point what I tried.