2019-09-26 08:06:00 -04:00
|
|
|
# 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
|
2020-01-20 22:08:37 -05:00
|
|
|
RSpec.shared_context 'custom session' do
|
2019-09-26 08:06:00 -04:00
|
|
|
let!(:session) { {} }
|
|
|
|
|
|
|
|
around do |example|
|
|
|
|
Gitlab::Session.with_session(session) do
|
|
|
|
example.run
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|