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

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

RSpec.shared_examples 'a retryable job' do
  describe '#enqueue_immediately?' do
    it 'defaults to false' do
      expect(subject.enqueue_immediately?).to eq(false)
    end
  end

  describe '#set_enqueue_immediately!' do
    it 'changes #enqueue_immediately? to true' do
      expect { subject.set_enqueue_immediately! }
        .to change { subject.enqueue_immediately? }.from(false).to(true)
    end
  end
end