Class: RubyMemcheck::RSpec::RakeTask
- Inherits:
-
RSpec::Core::RakeTask
- Object
- RSpec::Core::RakeTask
- RubyMemcheck::RSpec::RakeTask
- Defined in:
- lib/ruby_memcheck/rspec/rake_task.rb
Instance Attribute Summary collapse
-
#configuration ⇒ Object
readonly
Returns the value of attribute configuration.
-
#reporter ⇒ Object
readonly
Returns the value of attribute reporter.
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.
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/ruby_memcheck/rspec/rake_task.rb', line 11 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.
8 9 10 |
# File 'lib/ruby_memcheck/rspec/rake_task.rb', line 8 def configuration @configuration end |
#reporter ⇒ Object (readonly)
Returns the value of attribute reporter.
9 10 11 |
# File 'lib/ruby_memcheck/rspec/rake_task.rb', line 9 def reporter @reporter end |
Instance Method Details
#run_task(verbose) ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/ruby_memcheck/rspec/rake_task.rb', line 22 def run_task(verbose) error = nil @reporter = TestTaskReporter.new(configuration) @reporter.run_ruby_with_valgrind do # RSpec::Core::RakeTask#run_task calls Kernel.exit on failure super rescue SystemExit => e error = e end raise error if error end |