#Testing a specific Phoenix context

2 messages · Page 1 of 1 (latest)

icy otter
#

I am wondering if there is a way to test a context fully through command line. In a large project with tons of files I’d like to be able to test just the context I’m working with which would include relevant controller files and core logic files.

Ideally is there a way I can do something like mix test context_name?

urban smelt
#

mix test path/to/file runs just that file (but that's a path to a *_test.exs file, not the context). If your context tests are in one test file you can do that, if they're spread around then maybe you want to look into ex_unit tags