File: any_fixture.rb

package info (click to toggle)
ruby-test-prof 0.12.2%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 508 kB
  • sloc: ruby: 4,075; makefile: 4
file content (21 lines) | stat: -rw-r--r-- 496 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# frozen_string_literal: true

require "test_prof/any_fixture"
require "test_prof/recipes/rspec/before_all"

RSpec.shared_context "any_fixture:clean" do
  extend TestProf::BeforeAll::RSpec

  before_all do
    TestProf::AnyFixture.clean
  end
end

RSpec.configure do |config|
  config.include_context "any_fixture:clean", with_clean_fixture: true

  config.after(:suite) do
    TestProf::AnyFixture.report_stats if TestProf::AnyFixture.reporting_enabled?
    TestProf::AnyFixture.reset
  end
end