Knapsack Pro

Check out the new docs for the updated documentation.

FAQ / knapsack_pro / General questions for knapsack_pro gem

How to exclude tests from running them?

For instance you would like to run all tests except tests in features directory then you could do:


KNAPSACK_PRO_TEST_FILE_EXCLUDE_PATTERN="spec/features/**{,/*/**}/*_spec.rb" \
bundle exec rake knapsack_pro:queue:rspec

You can define at the same time the pattern for tests you would like to run and the exclude pattern. For instance run all controller tests except admin controller tests.


KNAPSACK_PRO_TEST_FILE_PATTERN="spec/controllers/**{,/*/**}/*_spec.rb" \
KNAPSACK_PRO_TEST_FILE_EXCLUDE_PATTERN="spec/controllers/admin/**{,/*/**}/*_spec.rb" \
bundle exec rake knapsack_pro:queue:rspec

The test file pattern KNAPSACK_PRO_TEST_FILE_PATTERN and exclude pattern KNAPSACK_PRO_TEST_FILE_EXCLUDE_PATTERN support any glob pattern handled by Dir.glob.

# General questions for knapsack_pro gem
See questions outside of this category

Start using Knapsack Pro

Sign up and speed up your tests.