Sha256: eb159666a5026a6e88a77b34957c1caa3372553cecad7437cd7c3cb5e279c5a2

Contents?: true

Size: 793 Bytes

Versions: 1

Compression:

Stored size: 793 Bytes

Contents

# frozen_string_literal: true

module Coverband
  module Adapters
    ###
    # NullStore is for benchmarking the impacts of calculating
    # and storing coverage data independant of Coverband/Coverage
    #
    # Usage:
    # config.store = Coverband::Adapters::NullStore.new
    ###
    class NullStore < Base
      def initialize(_opts = {})
        super()
      end

      def clear!
        # NOOP
      end

      def size
        0
      end

      def migrate!
        raise NotImplementedError, "NullStore doesn't support migrations"
      end

      def coverage(_local_type = nil)
        {}
      end

      def save_report(report)
        # NOOP
      end

      def raw_store
        raise NotImplementedError, "NullStore doesn't support raw_store"
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
coverband-5.1.1 lib/coverband/adapters/null_store.rb