lib/lopata/condition.rb in lopata-0.1.18 vs lib/lopata/condition.rb in lopata-0.1.19
- old
+ new
@@ -15,10 +15,16 @@
def match_metadata?(scenario)
metadata = scenario.metadata
case condition
when Hash
- condition.keys.all? { |k| metadata[k] == condition[k] }
+ condition.keys.all? do |k|
+ if condition[k].is_a? Array
+ condition[k].include?(metadata[k])
+ else
+ metadata[k] == condition[k]
+ end
+ end
when Array
condition.map { |key| metadata[key] }.all?
when TrueClass, FalseClass
condition
else
\ No newline at end of file