Welcome to mirror list, hosted at ThFree Co, Russian Federation.

delta_spec.rb « metrics « gitlab « lib « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: fdbb5e4ce4d1a8b42f2a4b195b526964e76c88c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# frozen_string_literal: true

require 'fast_spec_helper'

RSpec.describe Gitlab::Metrics::Delta do
  let(:delta) { described_class.new }

  describe '#compared_with' do
    it 'returns the delta as a Numeric' do
      expect(delta.compared_with(5)).to eq(5)
    end

    it 'bases the delta on a previously used value' do
      expect(delta.compared_with(5)).to eq(5)
      expect(delta.compared_with(15)).to eq(10)
    end
  end
end