Module: Minitag
- Defined in:
- lib/minitag.rb,
lib/minitag/context.rb,
lib/minitag/version.rb,
lib/minitag/minitest_tag.rb,
lib/minitag/tag_registry.rb,
lib/minitag/tag_extension.rb,
lib/minitag/extension_registry.rb
Overview
Namespace for classes or modules providing tagging functionality to Minitest::Test
Defined Under Namespace
Modules: MinitestTag, TagExtension Classes: Context, ExtensionRegistry, TagRegistry
Constant Summary collapse
- VERSION =
'0.7.0'
Class Attribute Summary collapse
-
.skip_filtered ⇒ Object
writeonly
Sets the attribute skip_filtered.
Class Method Summary collapse
-
.add_filter(tag) ⇒ Object
Add filtering tag to context specified by the ‘–tag` or `-t` option.
-
.context ⇒ Object
Execution context of the test suite.
-
.extension_registry ⇒ Object
Registry of classes that requires extension by Minitag::TagExtension.
-
.pending_tags ⇒ Object
Tags from the last ‘tag` method awaiting to be associated with a test.
-
.pending_tags=(tags) ⇒ Object
Tags set from the ‘tag` method.
-
.register_for_extension(klass) ⇒ Object
Register a class for extension.
-
.skip_filtered? ⇒ Boolean
Whether to skip (true) or hide (false) filtered tests.
Class Attribute Details
.skip_filtered=(value) ⇒ Object (writeonly)
Sets the attribute skip_filtered
15 16 17 |
# File 'lib/minitag.rb', line 15 def skip_filtered=(value) @skip_filtered = value end |
Class Method Details
.add_filter(tag) ⇒ Object
Add filtering tag to context specified by the ‘–tag` or `-t` option.
33 34 35 |
# File 'lib/minitag.rb', line 33 def add_filter(tag) context.add_filter(tag) end |
.context ⇒ Object
Execution context of the test suite.
28 29 30 |
# File 'lib/minitag.rb', line 28 def context @context ||= Context.new end |
.extension_registry ⇒ Object
Registry of classes that requires extension by Minitag::TagExtension.
18 19 20 |
# File 'lib/minitag.rb', line 18 def extension_registry @extension_registry ||= ExtensionRegistry.new end |
.pending_tags ⇒ Object
Tags from the last ‘tag` method awaiting to be associated with a test.
38 39 40 |
# File 'lib/minitag.rb', line 38 def @pending_tags || [] end |
.pending_tags=(tags) ⇒ Object
Tags set from the ‘tag` method.
43 44 45 |
# File 'lib/minitag.rb', line 43 def () @pending_tags = Array() end |
.register_for_extension(klass) ⇒ Object
Register a class for extension.
23 24 25 |
# File 'lib/minitag.rb', line 23 def register_for_extension(klass) extension_registry.register(klass) end |
.skip_filtered? ⇒ Boolean
Whether to skip (true) or hide (false) filtered tests.
48 49 50 |
# File 'lib/minitag.rb', line 48 def skip_filtered? @skip_filtered || false end |