Module: Minitest
- Defined in:
- lib/minitest/minitag_plugin.rb
Overview
Plugin extension to allow developers to run their tests while specifying the ‘–tag` or `-t` options.
Class Method Summary collapse
Class Method Details
.plugin_minitag_init(options) ⇒ Object
19 20 21 22 23 24 25 |
# File 'lib/minitest/minitag_plugin.rb', line 19 def self.plugin_minitag_init() Array([:tags]).each do |tag| Minitag.add_filter(tag) end Minitag.skip_filtered = .fetch(:skip_filtered, false) end |
.plugin_minitag_options(opts, options) ⇒ Object
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/minitest/minitag_plugin.rb', line 8 def self.(opts, ) opts.on '-t', '--tag TAG' do |tag| [:tags] ||= [] [:tags] << tag.to_s.strip.downcase end opts.on '--skip-filtered' do [:skip_filtered] = true end end |