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

presenter_spec.rb « variable « ci « presenters « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: b3afb2e2e3362a1db3067a093fa39269d84503e0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
require 'spec_helper'

describe Ci::Variable::Presenter do
  let(:variable) { double(:variable) }

  subject do
    described_class.new(variable)
  end

  it 'inherits from Gitlab::View::Presenter::Simple' do
    expect(described_class.superclass).to eq(Gitlab::View::Presenter::Simple)
  end

  describe '#initialize' do
    it 'takes a variable and optional params' do
      expect { subject }.not_to raise_error
    end

    it 'exposes variable' do
      expect(subject.variable).to eq(variable)
    end
  end
end