Class: Inspec::Profile::AstHelper::TestsCollector
- Inherits:
-
CollectorBase
- Object
- Parser::AST::Processor
- CollectorBase
- Inspec::Profile::AstHelper::TestsCollector
- Defined in:
- lib/inspec/utils/profile_ast_helpers.rb
Instance Attribute Summary
Attributes inherited from CollectorBase
Instance Method Summary collapse
Methods inherited from CollectorBase
Constructor Details
This class inherits a constructor from Inspec::Profile::AstHelper::CollectorBase
Instance Method Details
#on_block(node) ⇒ Object
362 363 364 365 366 367 |
# File 'lib/inspec/utils/profile_ast_helpers.rb', line 362 def on_block(node) if RuboCop::AST::NodePattern.new("(block (send nil? :describe ...) ...)").match(node) || RuboCop::AST::NodePattern.new("(block (send nil? :expect ...) ...)").match(node) memo[:checks] << node.source end end |