|
26 | 26 | end
|
27 | 27 |
|
28 | 28 | it "should call pacman to install the right package quietly when yaourt is not installed" do
|
29 |
| - args = ['--noconfirm', '--needed', '--noprogressbar', '-Sy', resource[:name]] |
| 29 | + args = ['--noconfirm', '--needed', '--noprogressbar', '-S', resource[:name]] |
30 | 30 | expect(provider).to receive(:pacman).at_least(:once).with(*args).and_return('')
|
31 | 31 | provider.install
|
32 | 32 | end
|
33 | 33 |
|
34 | 34 | it "should call yaourt to install the right package quietly when yaourt is installed" do
|
35 | 35 | allow(described_class).to receive(:yaourt?).and_return(true)
|
36 |
| - args = ['--noconfirm', '--needed', '--noprogressbar', '-Sy', resource[:name]] |
| 36 | + args = ['--noconfirm', '--needed', '--noprogressbar', '-S', resource[:name]] |
37 | 37 | expect(provider).to receive(:yaourt).at_least(:once).with(*args).and_return('')
|
38 | 38 | provider.install
|
39 | 39 | end
|
|
68 | 68 | end
|
69 | 69 |
|
70 | 70 | it "should call pacman to install the right package quietly when yaourt is not installed" do
|
71 |
| - args = ['--noconfirm', '--needed', '--noprogressbar', '-x', '--arg=value', '-Sy', resource[:name]] |
| 71 | + args = ['--noconfirm', '--needed', '--noprogressbar', '-x', '--arg=value', '-S', resource[:name]] |
72 | 72 | expect(provider).to receive(:pacman).at_least(:once).with(*args).and_return('')
|
73 | 73 | provider.install
|
74 | 74 | end
|
75 | 75 |
|
76 | 76 | it "should call yaourt to install the right package quietly when yaourt is installed" do
|
77 | 77 | expect(described_class).to receive(:yaourt?).and_return(true)
|
78 |
| - args = ['--noconfirm', '--needed', '--noprogressbar', '-x', '--arg=value', '-Sy', resource[:name]] |
| 78 | + args = ['--noconfirm', '--needed', '--noprogressbar', '-x', '--arg=value', '-S', resource[:name]] |
79 | 79 | expect(provider).to receive(:yaourt).at_least(:once).with(*args).and_return('')
|
80 | 80 | provider.install
|
81 | 81 | end
|
|
94 | 94 | resource[:source] = source
|
95 | 95 |
|
96 | 96 | expect(executor).to receive(:execute).
|
97 |
| - with(include("-Sy") & include("--noprogressbar"), no_extra_options). |
| 97 | + with(include("-S") & include("--noprogressbar"), no_extra_options). |
98 | 98 | ordered.
|
99 | 99 | and_return("")
|
100 | 100 |
|
|
117 | 117 |
|
118 | 118 | it "should install from the path segment of the URL" do
|
119 | 119 | expect(executor).to receive(:execute).
|
120 |
| - with(include("-Sy") & include("--noprogressbar") & include("--noconfirm"), |
| 120 | + with(include("-S") & include("--noprogressbar") & include("--noconfirm"), |
121 | 121 | no_extra_options).
|
122 | 122 | ordered.
|
123 | 123 | and_return("")
|
|
348 | 348 | end
|
349 | 349 |
|
350 | 350 | describe "when determining the latest version" do
|
351 |
| - it "should refresh package list" do |
352 |
| - expect(executor).to receive(:execute). |
353 |
| - ordered. |
354 |
| - with(['/usr/bin/pacman', '-Sy'], no_extra_options) |
355 |
| - |
356 |
| - expect(executor).to receive(:execute). |
357 |
| - ordered. |
358 |
| - and_return("") |
359 |
| - |
360 |
| - provider.latest |
361 |
| - end |
362 |
| - |
363 | 351 | it "should get query pacman for the latest version" do
|
364 |
| - expect(executor).to receive(:execute).ordered |
365 |
| - |
366 | 352 | expect(executor).to receive(:execute).
|
367 | 353 | ordered.
|
368 | 354 | with(['/usr/bin/pacman', '-Sp', '--print-format', '%v', resource[:name]], no_extra_options).
|
|
379 | 365 |
|
380 | 366 | it "should return a virtual group version when resource is a package group" do
|
381 | 367 | allow(described_class).to receive(:group?).and_return(true)
|
382 |
| - expect(executor).to receive(:execute).with(['/usr/bin/pacman', '-Sy'], no_extra_options).ordered |
383 | 368 | expect(executor).to receive(:execute).with(['/usr/bin/pacman', '-Sp', '--print-format', '%n %v', resource[:name]], no_extra_options).ordered.
|
384 | 369 | and_return(<<EOF)
|
385 | 370 | package2 1.0.1
|
|
0 commit comments