uclibs / treatment_database

Application to track conservation workflow for Preservation Services
1 stars 2 forks source link

519 - Add shared rake test context #521

Closed Janell-Huyck closed 2 weeks ago

Janell-Huyck commented 3 weeks ago

Fixes #519

This PR adds a shared context for the testing of Rake tasks, indicated in Rspec by type :task. It loads the rake tasks we have, both custom and built-in, and then clears the Rake application after each test to help keep changes made in one test from affecting other tests. These steps could be manually done in each test; this PR is to help keep code DRY and to assist in keeping rake tests from affecting the state of other rake tests.