Created
July 23, 2020 20:31
-
-
Save Lukeghenco/f53257d55b5e2ab95daeac0202fbd3b6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## @tag :integration | |
To integrate this into an existing test just use the following: | |
1. The Entire "Test" file | |
<img width="360" alt="Screen Shot 2020-07-22 at 1 57 53 PM" src="https://user-images.githubusercontent.com/15013243/88229612-e2d9c400-cc25-11ea-8f65-cce1b0fe6e7f.png"> | |
2. The Entire "Describe" block | |
<img width="693" alt="Screen Shot 2020-07-22 at 1 56 52 PM" src="https://user-images.githubusercontent.com/15013243/88229629-eb31ff00-cc25-11ea-8935-250a9a0ac808.png"> | |
3. The Single "Test" block | |
<img width="715" alt="Screen Shot 2020-07-22 at 2 16 57 PM" src="https://user-images.githubusercontent.com/15013243/88229718-0dc41800-cc26-11ea-8ebd-02647d995760.png"> | |
I've also added some quick `Mix` aliases to run the unit and integration tests separately using: | |
``` | |
mix test.unit | |
mix test.integration | |
``` | |
If you want to just run a single file you have 2 options | |
``` | |
mix test.integration /some/random/file.exs | |
# or | |
mix test /some/random/file.exs --only integration | |
``` | |
## What is mocked with @tag :integration ? | |
Currently I've only mocked out the stubs that are calling external services outside of Registrar. I'm sure this list will be added to in the future, but left with what works for now and this PR. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment