Skip to content
Matthew Conway edited this page Sep 5, 2015 · 4 revisions

Writing Tests

Pliny tests are composed:

Pliny's default setup does not enable RSpec expectations. See: config.expect_with in spec_helper

Acceptance Tests

These are tests running on behalf of your users, focused on testing the "happy paths" of your application with as little mocking and stubbing as possible. As a result they tend to be more costly, both in terms of the effort it takes to setup and in terms of how long they take – but having a test that ensures your endpoints remain stable is well worth the cost.

Running tests

To run all tests in your app:

$ rake

You can then use the rspec binary to run a single test suite:

$ rspec spec/acceptance/artists_spec.rb

Or even a single test case:

$ rspec spec/acceptance/artists_spec.rb:16 # run only test defined around this line