module Minitest::Tagz

Constants

VERSION

Attributes

log_if_no_match[RW]
log_if_no_match?[RW]
run_all_if_no_match[RW]
run_all_if_no_match?[RW]

Public Class Methods

choose_tags(*tags, log_if_no_match: false, run_all_if_no_match: false) click to toggle source

Create a master TagSet that you wish to test. You only want to run tests with tags in this set

@param [Enumerable<Symbol>] tags - a list of tags you want to test @param [Boolean] run_all_if_no_match - will run all tests if no tests are found with the tag @param [Boolean] log_if_no_match - puts if no match specs found

# File lib/minitest/tagz.rb, line 22
def choose_tags(*tags, log_if_no_match: false, run_all_if_no_match: false)
  @chosen_tags = tags.map(&:to_s)
  @run_all_if_no_match = run_all_if_no_match
  @log_if_no_match = log_if_no_match
end
chosen_tags() click to toggle source

@private

# File lib/minitest/tagz.rb, line 29
def chosen_tags
  @chosen_tags ||= []
end
negative_tags() click to toggle source

@private

# File lib/minitest/tagz.rb, line 39
def negative_tags
  chosen_tags.select {|t| t.is_a?(String) && t[/^-/]}.map {|t| t[1..-1]}
end
positive_tags() click to toggle source

@private

# File lib/minitest/tagz.rb, line 34
def positive_tags
  chosen_tags.reject {|t| t.is_a?(String) && t[/^-/]}
end
serialize(owner, test_name) click to toggle source

@private

# File lib/minitest/tagz.rb, line 44
def serialize(owner, test_name)
  "#{owner} >> #{test_name}"
end
tag_map() click to toggle source

@private

# File lib/minitest/tagz.rb, line 49
def tag_map
  @tag_map ||= {}
end