Module: Testprune::Adapters::RSpec
- Defined in:
- lib/testprune/adapters/rspec.rb
Overview
RSpec integration. Installed by autostart once ::RSpec is defined. Wraps each example to capture its coverage delta + timing, and dumps run.json after the suite.
Class Method Summary collapse
Class Method Details
.install ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/testprune/adapters/rspec.rb', line 11 def self.install recorder = Testprune::Recorder.instance recorder.framework = 'rspec' ::RSpec.configure do |config| config.around(:each) do |example| md = example. Testprune::Recorder.instance.around( id: example.id, description: example.full_description, file: md[:file_path], line: md[:line_number] ) { example.run } end config.after(:suite) { Testprune::Recorder.instance.dump } end end |