8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
# File 'lib/capydash/rspec.rb', line 8
def setup!
return unless rspec_available?
return if @configured
begin
@configured = true
@results = []
@started_at = nil
::RSpec.configure do |config|
config.before(:suite) do
CapyDash::RSpec.start_run
end
config.after(:each) do |example|
CapyDash::RSpec.record_example(example)
end
config.after(:suite) do
CapyDash::RSpec.generate_report
end
end
rescue => e
@configured = false
end
end
|