|
35 | 35 |
|
36 | 36 | it 'loads index' do |
37 | 37 | allow(application_cache).to receive(:get).with(%r{/test-uri/index\.yml}) |
38 | | - .and_yield(Pathname.new('spec/fixtures/test-index.yml').open) |
| 38 | + .and_yield(Pathname.new('spec/fixtures/test-index.yml').open) |
39 | 39 | allow(JavaBuildpack::Repository::VersionResolver).to receive(:resolve).with('test-version', %w[resolved-version]) |
40 | | - .and_return('resolved-version') |
| 40 | + .and_return('resolved-version') |
41 | 41 |
|
42 | 42 | repository_index = described_class.new('{platform}/{architecture}/test-uri') |
43 | 43 |
|
|
46 | 46 |
|
47 | 47 | it 'copes with trailing slash in repository URI' do |
48 | 48 | allow(application_cache).to receive(:get).with(%r{/test-uri/index\.yml}) |
49 | | - .and_yield(Pathname.new('spec/fixtures/test-index.yml').open) |
| 49 | + .and_yield(Pathname.new('spec/fixtures/test-index.yml').open) |
50 | 50 | allow(JavaBuildpack::Repository::VersionResolver).to receive(:resolve).with('test-version', %w[resolved-version]) |
51 | | - .and_return('resolved-version') |
| 51 | + .and_return('resolved-version') |
52 | 52 |
|
53 | 53 | repository_index = described_class.new('{platform}/{architecture}/test-uri/') |
54 | 54 |
|
|
59 | 59 | allow(JavaBuildpack::Util::ConfigurationUtils) |
60 | 60 | .to receive(:load).with('repository').and_return('default_repository_root' => 'http://default-repository-root/') |
61 | 61 | allow(application_cache).to receive(:get).with('http://default-repository-root/test-uri/index.yml') |
62 | | - .and_yield(Pathname.new('spec/fixtures/test-index.yml').open) |
| 62 | + .and_yield(Pathname.new('spec/fixtures/test-index.yml').open) |
63 | 63 |
|
64 | 64 | described_class.new('{default.repository.root}/test-uri') |
65 | 65 | end |
|
75 | 75 | allow(redhat_release).to receive(:exist?).and_return(true) |
76 | 76 | allow(redhat_release).to receive(:read).and_return('CentOS release 6.4 (Final)') |
77 | 77 | allow(application_cache).to receive(:get).with('centos6/x86_64/test-uri/index.yml') |
78 | | - .and_yield(Pathname.new('spec/fixtures/test-index.yml').open) |
| 78 | + .and_yield(Pathname.new('spec/fixtures/test-index.yml').open) |
79 | 79 |
|
80 | 80 | described_class.new('{platform}/{architecture}/test-uri') |
81 | 81 |
|
|
90 | 90 | allow_any_instance_of(described_class).to receive(:`).with('uname -s').and_return('Darwin') |
91 | 91 | allow_any_instance_of(described_class).to receive(:`).with('uname -m').and_return('x86_64') |
92 | 92 | allow(application_cache).to receive(:get).with('mountainlion/x86_64/test-uri/index.yml') |
93 | | - .and_yield(Pathname.new('spec/fixtures/test-index.yml').open) |
| 93 | + .and_yield(Pathname.new('spec/fixtures/test-index.yml').open) |
94 | 94 |
|
95 | 95 | described_class.new('{platform}/{architecture}/test-uri') |
96 | 96 |
|
|
105 | 105 | allow_any_instance_of(described_class).to receive(:`).with('uname -s').and_return('Linux') |
106 | 106 | allow_any_instance_of(described_class).to receive(:`).with('uname -m').and_return('x86_64') |
107 | 107 | allow_any_instance_of(described_class).to receive(:`).with('which lsb_release 2> /dev/null') |
108 | | - .and_return('/usr/bin/lsb_release') |
| 108 | + .and_return('/usr/bin/lsb_release') |
109 | 109 | allow_any_instance_of(described_class).to receive(:`).with('lsb_release -cs').and_return('precise') |
110 | 110 | allow(application_cache).to receive(:get).with('precise/x86_64/test-uri/index.yml') |
111 | | - .and_yield(Pathname.new('spec/fixtures/test-index.yml').open) |
| 111 | + .and_yield(Pathname.new('spec/fixtures/test-index.yml').open) |
112 | 112 |
|
113 | 113 | described_class.new('{platform}/{architecture}/test-uri') |
114 | 114 |
|
|
0 commit comments