class PigCI::TestFrameworks::Rspec
Public Class Methods
configure!()
click to toggle source
# File lib/pig_ci/test_frameworks/rspec.rb, line 2 def self.configure! if defined?(::RSpec) ::RSpec.configure do |config| config.around(:each, pig_ci: false) do |example| @pig_ci_enabled = PigCI.enabled? PigCI.enabled = false example.run PigCI.enabled = @pig_ci_enabled end config.around(:each, pig_ci: true) do |example| @pig_ci_enabled = PigCI.enabled? PigCI.enabled = true example.run PigCI.enabled = @pig_ci_enabled end end end end