debian-mirror-gitlab/spec/support/shared_contexts/session_shared_context.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
399 B
Ruby
Raw Normal View History

2019-12-21 20:55:43 +05:30
# 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-03-13 15:44:24 +05:30
RSpec.shared_context 'custom session' do
2019-12-21 20:55:43 +05:30
let!(:session) { {} }
around do |example|
Gitlab::Session.with_session(session) do
example.run
end
end
end