This article describe how to exclude tests matching a specific tag.
🏈 Preparation
Please set an option to give us a cleaner syntax: spec/spec_helper.rb
RSpec.configure do |config| |
🐹 Adding tag
describe '#do_something', :skip do |
🐡 Tag based execution
Run everything, except for :skip
tests:
$ bundle exec rspec --tag \~skip spec/ |
If you want to run tests mathcing :skip
tag:
$ bundle exec rspec --tag skip spec/ |
😼 Special Thanks
- Greater Test Control With RSpec’s Tag Filters -
- ruby - How can I exclude Rspec tests matching a specific tag? - Stack Overflow
--tag
option - Command line - RSpec Core - RSpec - Relish
🖥 Recommended VPS Service
VULTR provides high performance cloud compute environment for you.
Vultr has 15 data-centers strategically placed around the globe, you can use a VPS with 512 MB memory for just $ 2.5 / month ($ 0.004 / hour).
In addition, Vultr is up to 4 times faster than the competition, so please check it => Check Benchmark Results!!