Skip to content
Snippets Groups Projects
Commit e80e4e14 authored by Gabriel Mazetto's avatar Gabriel Mazetto :red_circle:
Browse files

Add a TestContext as a future replacement to the FakeContext

parent 83eb9d21
No related branches found
No related tags found
3 merge requests!181325Fix ambiguous `created_at` in project.rb,!179611Draft: Rebase CR approach for zoekt assignments,!170246Decouple loading of db config from the rails codebase
......@@ -32,6 +32,10 @@ def build_fake_context
env: ActiveSupport::EnvironmentInquirer.new('test')
)
end
def build_test_context
TestContext.new
end
end
RSpec.configure do |config|
......
# frozen_string_literal: true
class TestContext < Gitlab::Backup::Cli::Context::SourceContext
def gitlab_basepath
test_helpers.spec_path.join('../../..')
end
def backup_basedir
test_helpers.temp_path.join('backups')
end
private
def test_helpers
Class.new.extend(GitlabBackupHelpers)
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment