Skip to content

Commit

Permalink
Link to an example of the testInDebug helper
Browse files Browse the repository at this point in the history
  • Loading branch information
courajs committed Mar 18, 2016
1 parent bc33a86 commit 83d9e9a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ And in case we didn't emphasize it enough: we love tests!

## Writing Tests

* We do write tests for our warns and assertion messages. You may use the `assert.expectAssertion()` and `assert.expectWarning()` helpers for this. Note: Our Travis tests that will run on your PR run in the `production` envrionment, where warnings and assertions are stripped. If you're writing a test for these, you should use `testInDebug` helper rather than `test` to define your test.
* We do write tests for our warns and assertion messages, using the `assert.expectAssertion()` and `assert.expectWarning()` helpers.
* Because Travis runs tests in the `production` environment, assertions and warnings are stripped out. To avoid tests on warning/assertion messages failing for your PR, use the `testInDebug` helper to skip them in production. See [this](https://github.com/emberjs/data/blob/b3eb9c098ef8c2cf9ff3378ed079769782c02bb5/tests/integration/adapter/queries-test.js#L32) example.


NOTE: Partially copied from https://raw.github.com/thoughtbot/factory_girl_rails/master/CONTRIBUTING.md

0 comments on commit 83d9e9a

Please sign in to comment.