def debug
      ::RSpec.configure do |config|
        config.add_setting :debugger_proc
        config.debugger_proc = ->(ex) do
          exception = ex.exception
          defined?(Pry) ? binding.pry : debugger # rubocop:disable Debugger
        end
        config.after(debug: true) do |ex|
          instance_exec(ex, &config.debugger_proc) if ex.exception
        end
      end
    end
def debug
      ::RSpec.configure do |config|
        config.add_setting :debugger_proc
        config.debugger_proc = ->(ex) do
          exception = ex.exception
          defined?(Pry) ? binding.pry : debugger # rubocop:disable Debugger
        end
        config.after(debug: true) do |ex|
          instance_exec(ex, &config.debugger_proc) if ex.exception
        end
      end
    end
Runs debugger after each failed example with `:debug` tag.
 Uses `pry` by default, this can be configured `config.debugger=`.