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

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

# the session is empty by default; you can overwrite it by defining your own
# let(:session) variable
# we do not use a parameter such as |session| because it does not play nice
# with let variables
RSpec.shared_context 'custom session' do
  let!(:session) { {} }

  around do |example|
    Gitlab::Session.with_session(session) do
      example.run
    end
  end
end