Skip to content
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

Sharing mocks between specs #273

Open
kyrofa opened this issue Jul 18, 2022 · 3 comments
Open

Sharing mocks between specs #273

kyrofa opened this issue Jul 18, 2022 · 3 comments

Comments

@kyrofa
Copy link

kyrofa commented Jul 18, 2022

How do I go about defining a command-based mock that can be shared between *_spec.sh files?

@Crown0815
Copy link

Crown0815 commented Dec 11, 2023

@kyrofa, I am wondering myself. Have you had any success by now?
I am struggling with function-based commands though

@alexandredosim
Copy link

Did you tried to import the mock from another file?

@kyrofa
Copy link
Author

kyrofa commented Dec 11, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants