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

unspecified_spec.rb « entry « config « gitlab « lib « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 35ba992f62ad5d880eb6dd358ca4daa80ff94173 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# frozen_string_literal: true

require 'spec_helper'

RSpec.describe Gitlab::Config::Entry::Unspecified do
  let(:unspecified) { described_class.new(entry) }
  let(:entry) { spy('Entry') }

  describe '#valid?' do
    it 'delegates method to entry' do
      expect(unspecified.valid?).to eq entry
    end
  end

  describe '#errors' do
    it 'delegates method to entry' do
      expect(unspecified.errors).to eq entry
    end
  end

  describe '#value' do
    it 'delegates method to entry' do
      expect(unspecified.value).to eq entry
    end
  end

  describe '#specified?' do
    it 'is always false' do
      allow(entry).to receive(:specified?).and_return(true)

      expect(unspecified.specified?).to be false
    end
  end
end