debian-mirror-gitlab/spec/support/shared_contexts/session_shared_context.rb
2020-03-09 13:42:32 +05:30

15 lines
399 B
Ruby

# 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