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

@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
### Fixed
- Fix `Spectator.configure` block calls to `filter_run_excluding` and `filter_run_including`. [#61](https://gitlab.com/arctic-fox/spectator/-/issues/61)
## [0.10.0] - 2021-09-19 ## [0.10.0] - 2021-09-19
### Fixed ### Fixed
- Fix resolution of types with the same name in nested scopes. [#31](https://github.com/icy-arctic-fox/spectator/issues/31) - Fix resolution of types with the same name in nested scopes. [#31](https://github.com/icy-arctic-fox/spectator/issues/31)

View file

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