|
15 | 15 |
|
16 | 16 | it 'executes with the given psql_path on the given DB' do
|
17 | 17 | expect(provider).to receive(:run_command).with(['psql', '-d',
|
18 |
| - attributes[:db], '-t', '-X', '-c', '"SELECT \'something\' as \"Custom column\""'], 'postgres', |
| 18 | + attributes[:db], '-t', '-X', '-c', 'SELECT \'something\' as "Custom column"'], 'postgres', |
19 | 19 | 'postgres', {})
|
20 | 20 |
|
21 | 21 | provider.run_sql_command('SELECT \'something\' as "Custom column"')
|
|
35 | 35 | it 'executes with the given psql_path on the given DB' do
|
36 | 36 | expect(Dir).to receive(:chdir).with(attributes[:cwd]).and_yield
|
37 | 37 | expect(provider).to receive(:run_command).with([attributes[:psql_path],
|
38 |
| - '-d', attributes[:db], '-t', '-X', '-c', '"SELECT \'something\' as \"Custom column\""'], |
| 38 | + '-d', attributes[:db], '-t', '-X', '-c', 'SELECT \'something\' as "Custom column"'], |
39 | 39 | attributes[:psql_user], attributes[:psql_group], {})
|
40 | 40 |
|
41 | 41 | provider.run_sql_command('SELECT \'something\' as "Custom column"')
|
|
50 | 50 |
|
51 | 51 | it 'executes with the given search_path' do
|
52 | 52 | expect(provider).to receive(:run_command).with(['psql', '-t', '-X', '-c',
|
53 |
| - '"set search_path to schema1; SELECT \'something\' as \"Custom column\""'], |
| 53 | + 'set search_path to schema1; SELECT \'something\' as "Custom column"'], |
54 | 54 | 'postgres', 'postgres', {})
|
55 | 55 |
|
56 | 56 | provider.run_sql_command('SELECT \'something\' as "Custom column"')
|
|
65 | 65 |
|
66 | 66 | it 'executes with the given search_path' do
|
67 | 67 | expect(provider).to receive(:run_command).with(['psql', '-t', '-X', '-c',
|
68 |
| - '"set search_path to schema1,schema2; SELECT \'something\' as \"Custom column\""'], |
| 68 | + 'set search_path to schema1,schema2; SELECT \'something\' as "Custom column"'], |
69 | 69 | 'postgres', 'postgres',
|
70 | 70 | {})
|
71 | 71 |
|
|
79 | 79 | it 'executes with the given port' do
|
80 | 80 | expect(provider).to receive(:run_command).with(['psql',
|
81 | 81 | '-p', '5555',
|
82 |
| - '-t', '-X', '-c', '"SELECT something"'], |
| 82 | + '-t', '-X', '-c', 'SELECT something'], |
83 | 83 | 'postgres', 'postgres', {})
|
84 | 84 |
|
85 | 85 | provider.run_sql_command('SELECT something')
|
|
91 | 91 | it 'executes with the given host' do
|
92 | 92 | expect(provider).to receive(:run_command).with(['psql',
|
93 | 93 | '-t', '-X', '-c',
|
94 |
| - '"SELECT something"'], |
| 94 | + 'SELECT something'], |
95 | 95 | 'postgres', 'postgres', 'PGHOST' => '127.0.0.1')
|
96 | 96 |
|
97 | 97 | provider.run_sql_command('SELECT something')
|
|
0 commit comments