Class: RubyMemcheck::RSpec::RakeTask
- Inherits:
-
RSpec::Core::RakeTask
- Object
- RSpec::Core::RakeTask
- RubyMemcheck::RSpec::RakeTask
- Includes:
- TestTaskReporter
- Defined in:
- lib/ruby_memcheck/rspec/rake_task.rb
Constant Summary
Constants included from TestTaskReporter
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) ⇒ RakeTask
constructor
A new instance of RakeTask.
- #run_task(verbose) ⇒ Object
Constructor Details
#initialize(*args) ⇒ RakeTask
Returns a new instance of RakeTask.
12 13 14 15 16 17 18 19 20 21 |
# File 'lib/ruby_memcheck/rspec/rake_task.rb', line 12 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.
10 11 12 |
# File 'lib/ruby_memcheck/rspec/rake_task.rb', line 10 def configuration @configuration end |
Instance Method Details
#run_task(verbose) ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/ruby_memcheck/rspec/rake_task.rb', line 23 def run_task(verbose) error = nil begin # RSpec::Core::RakeTask#run_task calls Kernel.exit on failure super rescue SystemExit => e error = e end report_valgrind_errors raise error if error end |