summaryrefslogtreecommitdiff
path: root/spec/support/shared_examples/ci/stage_shared_examples.rb
blob: 925974ed11e42c41085580b374cbc320874ad923 (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
# frozen_string_literal: true

shared_examples 'manual playable stage' do |stage_type|
  let(:stage) { build(stage_type, status: status) }

  describe '#manual_playable?' do
    subject { stage.manual_playable? }

    context 'when is manual' do
      let(:status) { 'manual' }

      it { is_expected.to be_truthy }
    end

    context 'when is scheduled' do
      let(:status) { 'scheduled' }

      it { is_expected.to be_truthy }
    end

    context 'when is skipped' do
      let(:status) { 'skipped' }

      it { is_expected.to be_truthy }
    end
  end
end