Sha256: 0bda858bd68acff1532f39b4d1e5f49c8cde5618948ddccd3dd8b4a4787445ff

Contents?: true

Size: 804 Bytes

Versions: 8

Compression:

Stored size: 804 Bytes

Contents

# frozen_string_literal: true

module Coverband
  module Adapters
    ###
    # NullStore is for benchmarking the impacts of calculating
    # and storing coverage data independent 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, opts = {})
        {}
      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

8 entries across 8 versions & 1 rubygems

Version Path
coverband-6.1.2 lib/coverband/adapters/null_store.rb
coverband-6.1.2.rc.1 lib/coverband/adapters/null_store.rb
coverband-6.1.1 lib/coverband/adapters/null_store.rb
coverband-6.1.0 lib/coverband/adapters/null_store.rb
coverband-6.0.3.rc.4 lib/coverband/adapters/null_store.rb
coverband-6.0.3.rc.3 lib/coverband/adapters/null_store.rb
coverband-6.0.3.rc.2 lib/coverband/adapters/null_store.rb
coverband-6.0.3.rc.1 lib/coverband/adapters/null_store.rb