Knowledge Base: Excluding Incompatible Test or Spec Files
Devver can run the vast majority of RSpec and Test::Unit tests. However, in rare instances, you may discover that some files in your test suite don't run on Devver. This can happen when tests have a dependency that Devver does not support (for instance, a dependency upon a resource which is only accessible within your private network). If this occurs, you can easily tell Devver to exclude these files.
To do so, open your copy of devver.rake and add any
files you wish to exclude to the EXCLUDED_TEST_FILES
array. You can add either strings or regular expressions that match
the files you want to exclude.
For example, if you had a test file named
foo_test.rb that did not run correctly on Devver, you
would change the line in devver.rake which looks like
this:
EXCLUDED_TEST_FILES = []
to this:
EXCLUDED_TEST_FILES = ['test/unit/foo_test.rb']
Once you exclude some tests, running rake
devver:test will, by default, never run the excluded tests.
You can use the RUN_EXCLUDED option to alter this
behavior:
rake devver:tests RUN_EXCLUDED=onlywill only run the excluded tests on your local machine (no tests will be run on Devver)rake devver:tests RUN_EXCLUDED=afterwill run all non-excluded tests on Devver and then run the excluded tests on your local machine.
Of course, you can use the RUN_EXCLUDED option with
any Devver Rake task (e.g. rake devver:test:units,
rake devver:test:functionals, etc.)