Exclude an array of tag values
Closed this issue · 3 comments
runephilosof-abtion commented
Subject of the issue
Exclude an array of tag values.
Your environment
- Ruby version: 3.1.6
- rspec-core version: 3.13.1
Steps to reproduce
rspec --tag ~type:model --tag ~type:system
Expected behavior
Run options: exclude {:type=>["model","system"]}
Actual behavior
Run options: exclude {:type=>"system"}
JonRowe commented
This is currently the expected behaviour, the filtering is a strict value match and per the docs:
Filtering by tag uses a hash internally, which means that you can’t specify multiple filters for the same key. For instance, if you try to exclude :name => 'foo' and :name => 'bar', you will only end up excluding :name => 'bar'.
So I'm closing this as a duplicate of rspec/rspec#10
runephilosof-abtion commented
I agree that it is the expected behavior according to the docs, it is a feature proposal.
However, it is not a duplicate of rspec/rspec#10, because I was still aiming for a OR between the two values (which I did not make clear).
JonRowe commented
rspec/rspec#10 covers both AND and OR and the need to disambiguate behavior