Class: RubyMemcheck::TestTask
- Inherits:
-
Rake::TestTask
- Object
- Rake::TestTask
- RubyMemcheck::TestTask
- Includes:
- TestTaskReporter
- Defined in:
- lib/ruby_memcheck/test_task.rb
Constant Summary
Constants included from TestTaskReporter
RubyMemcheck::TestTaskReporter::VALGRIND_REPORT_MSG
Instance Attribute Summary collapse
-
#configuration ⇒ Object
readonly
Returns the value of attribute configuration.
Attributes included from TestTaskReporter
Instance Method Summary collapse
-
#initialize(*args) ⇒ TestTask
constructor
A new instance of TestTask.
- #ruby(*args, **options, &block) ⇒ Object
Constructor Details
#initialize(*args) ⇒ TestTask
Returns a new instance of TestTask.
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/ruby_memcheck/test_task.rb', line 9 def initialize(*args) @configuration = if !args.empty? && args[0].is_a?(Configuration) args.shift else RubyMemcheck.default_configuration end super end |
Instance Attribute Details
#configuration ⇒ Object (readonly)
Returns the value of attribute configuration.
7 8 9 |
# File 'lib/ruby_memcheck/test_task.rb', line 7 def configuration @configuration end |
Instance Method Details
#ruby(*args, **options, &block) ⇒ Object
20 21 22 23 24 25 26 27 |
# File 'lib/ruby_memcheck/test_task.rb', line 20 def ruby(*args, **, &block) command = configuration.command(args) sh(command, **) do |ok, res| report_valgrind_errors yield ok, res if block_given? end end |