diff --git a/README.md b/README.md index 65c8fa1..0b47e71 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ smart people at [Hashrocket](http://hashrocket.com/). For a steady stream of TILs from a variety of rocketeers, checkout [til.hashrocket.com](https://til.hashrocket.com/). -_790 TILs and counting..._ +_791 TILs and counting..._ --- @@ -160,6 +160,7 @@ _790 TILs and counting..._ - [Run ExUnit Tests In A Deterministic Order](elixir/run-exunit-tests-in-a-deterministic-order.md) - [Run The Test At A Specific Line Number](elixir/run-the-test-at-a-specific-line-number.md) - [Same Functions Should Be Grouped Together](elixir/same-functions-should-be-grouped-together.md) +- [Skip A Specific Test](elixir/skip-a-specific-test.md) - [String Interpolation With Just About Anything](elixir/string-interpolation-with-just-about-anything.md) - [Unique Indexes With Ecto](elixir/unique-indexes-with-ecto.md) - [Updating Values In A Map](elixir/updating-values-in-a-map.md) diff --git a/elixir/skip-a-specific-test.md b/elixir/skip-a-specific-test.md new file mode 100644 index 0000000..e892066 --- /dev/null +++ b/elixir/skip-a-specific-test.md @@ -0,0 +1,19 @@ +# Skip A Specific Test + +Elixir's `ExUnit` supports all kinds of tags for customizing the behavior of +your test suite. The `:skip` tag signals that `ExUnit` should skip over that +specific test. + +```elixir +@tag :skip +test "this is a test that should not run" do + assert false +end +``` + +When you run `mix test`, it will make sure to not execute any tests with the +`:skip` tag. + +Using the `:skip` tag can be a great temporary measure in a lot of +situations. It is not a good long-term practice to keep these around and +check them in.