Skip to content
Snippets Groups Projects
Commit 6cdbe1c3 authored by Ash McKenzie's avatar Ash McKenzie :two:
Browse files

Pull #stub_pg_data_dir from #stub_pg_version_file

parent 494a2d96
No related branches found
No related tags found
1 merge request!2680Refactor PostgreSQL logic
This commit is part of merge request !2680. Comments created here will be created in the context of that merge request.
......@@ -171,11 +171,14 @@ RSpec.describe GDK::Postgresql do
end
end
def stub_pg_version_file(version = nil, exists: true)
def stub_pg_data_dir
allow(config).to receive(:postgresql).and_return(postgresql_config)
allow(pg_data_dir).to receive(:join).with('PG_VERSION').and_return(pg_version_file)
allow(pg_version_file).to receive(:exist?).and_return(exists)
end
def stub_pg_version_file(version = nil, exists: true)
stub_pg_data_dir
allow(pg_version_file).to receive(:exist?).and_return(exists)
allow(pg_version_file).to receive(:read).and_return(version) if version
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