Commits

Brian Gesiak committed 7551bc5db0d
Configuration: Add example filters Supports #134 by allowing users to specify example filters on Quick.Configuration. See `FocusedTests.swift` for sample usage. Filters come in two forms: 1. **Inclusion** filters: Only examples that meet the criteria specified by these filters are run. 2. **Exclusion** filters: Examples that meet the criteria specified by these filters are not run. By default, Quick is configured to only include examples where `["focused": true]`. But example flags are empty by default, so the condition that `["focused": true]` is false by default. This means that, by default, Quick runs no examples, right? Wrong! Because Quick.Configuration is also initialized with `runAllWhenEverythingFiltered` as true. In other words, in the case that **no examples** escape the filters, **all examples** are run. All this is pretty much exactly how RSpec does things: - https://www.relishapp.com/rspec/rspec-core/v/3-1/docs/filtering/inclusion-filters - https://www.relishapp.com/rspec/rspec-core/v/2-0/docs/filtering/run-all-when-everything-filtered