Skip to content

Commit 2239623

Browse files
kenyonbastelfreak
authored andcommitted
backports: improve test formatting
1 parent 4b6742b commit 2239623

File tree

1 file changed

+36
-20
lines changed

1 file changed

+36
-20
lines changed

spec/classes/apt_backports_spec.rb

Lines changed: 36 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,15 @@
2626
end
2727

2828
it {
29-
expect(subject).to contain_apt__source('backports').with(location: 'http://deb.debian.org/debian',
30-
repos: 'main contrib non-free',
31-
release: 'bullseye-backports',
32-
pin: { 'priority' => 200, 'release' => 'bullseye-backports' })
29+
expect(subject).to contain_apt__source('backports').with(
30+
location: 'http://deb.debian.org/debian',
31+
repos: 'main contrib non-free',
32+
release: 'bullseye-backports',
33+
pin: {
34+
'priority' => 200,
35+
'release' => 'bullseye-backports'
36+
},
37+
)
3338
}
3439
end
3540

@@ -52,10 +57,15 @@
5257
end
5358

5459
it {
55-
expect(subject).to contain_apt__source('backports').with(location: 'http://archive.ubuntu.com/ubuntu',
56-
repos: 'main universe multiverse restricted',
57-
release: 'jammy-backports',
58-
pin: { 'priority' => 200, 'release' => 'jammy-backports' })
60+
expect(subject).to contain_apt__source('backports').with(
61+
location: 'http://archive.ubuntu.com/ubuntu',
62+
repos: 'main universe multiverse restricted',
63+
release: 'jammy-backports',
64+
pin: {
65+
'priority' => 200,
66+
'release' => 'jammy-backports'
67+
},
68+
)
5969
}
6070
end
6171

@@ -87,11 +97,13 @@
8797
end
8898

8999
it {
90-
expect(subject).to contain_apt__source('backports').with(location: 'http://archive.ubuntu.com/ubuntu-test',
91-
key: 'A1BD8E9D78F7FE5C3E65D8AF8B48AD6246925553',
92-
repos: 'main',
93-
release: 'vivid',
94-
pin: { 'priority' => 90, 'release' => 'vivid' })
100+
expect(subject).to contain_apt__source('backports').with(
101+
location: 'http://archive.ubuntu.com/ubuntu-test',
102+
key: 'A1BD8E9D78F7FE5C3E65D8AF8B48AD6246925553',
103+
repos: 'main',
104+
release: 'vivid',
105+
pin: { 'priority' => 90, 'release' => 'vivid' },
106+
)
95107
}
96108
end
97109

@@ -124,8 +136,10 @@
124136
end
125137

126138
it {
127-
expect(subject).to contain_apt__source('backports').with(key: { 'id' => 'A1BD8E9D78F7FE5C3E65D8AF8B48AD6246925553' },
128-
pin: { 'priority' => '90' })
139+
expect(subject).to contain_apt__source('backports').with(
140+
key: { 'id' => 'A1BD8E9D78F7FE5C3E65D8AF8B48AD6246925553' },
141+
pin: { 'priority' => '90' },
142+
)
129143
}
130144
end
131145
end
@@ -159,11 +173,13 @@
159173
end
160174

161175
it {
162-
expect(subject).to contain_apt__source('backports').with(location: 'http://archive.ubuntu.com/ubuntu',
163-
key: '630239CC130E1A7FD81A27B140976EAF437D05B5',
164-
repos: 'main universe multiverse restricted',
165-
release: 'trusty-backports',
166-
pin: { 'priority' => 200, 'release' => 'trusty-backports' })
176+
expect(subject).to contain_apt__source('backports').with(
177+
location: 'http://archive.ubuntu.com/ubuntu',
178+
key: '630239CC130E1A7FD81A27B140976EAF437D05B5',
179+
repos: 'main universe multiverse restricted',
180+
release: 'trusty-backports',
181+
pin: { 'priority' => 200, 'release' => 'trusty-backports' },
182+
)
167183
}
168184
end
169185

0 commit comments

Comments
 (0)