Skip to content
This repository has been archived by the owner on Mar 9, 2019. It is now read-only.

Running Tests

Johan Henkens edited this page Apr 11, 2014 · 3 revisions

The project is setup with using RSpec for the primary test framework. It is configured to use Guard+Spork for faster, constant testing. You can open a new terminal window, cd into the octopi-webapp folder and then enter guard in order to see tests constantly run as new changes are noticed.

Alternatively, you can simply run RSpec in a one-off fashion, either only the whole project with rspec or on some subject of the project with rspec <files or subdirectory of spec folder>.

If you ever have issues with pending migrations in the test environment, it is a pretty quick fix:

$ rake db:drop RAILS_ENV=test
$ rake db:create RAILS_ENV=test
$ rake db:migrate RAILS_ENV=test
$ rake test:prepare

Not all of these steps may be necessary, but they do work together.