diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-09-26 15:06:00 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-09-26 15:06:00 +0300 |
commit | 5707f305f4b961e24369fcdaecf0b8ce1c34bad8 (patch) | |
tree | 3b291653b83b3e6c2bffc77c54527fbe6f6373be /spec/support/shared_contexts | |
parent | 759cd6c2985088d187ed519f2a881c2c690b34ec (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/support/shared_contexts')
-rw-r--r-- | spec/support/shared_contexts/session_shared_context.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/support/shared_contexts/session_shared_context.rb b/spec/support/shared_contexts/session_shared_context.rb new file mode 100644 index 00000000000..86c145a8360 --- /dev/null +++ b/spec/support/shared_contexts/session_shared_context.rb @@ -0,0 +1,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 +shared_context 'custom session' do + let!(:session) { {} } + + around do |example| + Gitlab::Session.with_session(session) do + example.run + end + end +end |