Stringify tags

Addresses https://gitlab.com/arctic-fox/spectator/-/issues/61
This commit is contained in:
Michael Miller 2021-09-11 16:05:20 -06:00
parent f608081b02
commit 632845574f
No known key found for this signature in database
GPG key ID: FB9F12F7C646A4AD
2 changed files with 8 additions and 4 deletions

View file

@ -270,8 +270,8 @@ module Spectator
# Specifies one or more tags to constrain running examples to.
def filter_run_including(*tags : Symbol, **values)
tags.each { |tag| @filters << TagNodeFilter.new(tag) }
values.each { |tag, value| @filters << TagNodeFilter.new(tag, value.to_s) }
tags.each { |tag| @filters << TagNodeFilter.new(tag.to_s) }
values.each { |tag, value| @filters << TagNodeFilter.new(tag.to_s, value.to_s) }
end
# Adds a filter to prevent examples from running.
@ -281,8 +281,8 @@ module Spectator
# Specifies one or more tags to exclude from running examples.
def filter_run_excluding(*tags : Symbol, **values)
tags.each { |tag| @rejects << TagNodeFilter.new(tag) }
values.each { |tag, value| @rejects << TagNodeFilter.new(tag, value.to_s) }
tags.each { |tag| @rejects << TagNodeFilter.new(tag.to_s) }
values.each { |tag, value| @rejects << TagNodeFilter.new(tag.to_s, value.to_s) }
end
# Specifies one or more tags to filter on only if they're present in the spec.