Skip to content

Commit 82299e4

Browse files
committed
fix unit test categorization
Before this change, tests for 'ensure' values other than 'present' are nested under 'when with an ensure of present', resulting in: Puppet::Type::Vcsrepo::ProviderGit when with an ensure of present when with an ensure of present - with a revision that is a remote branch executes 'git clone' and 'git checkout -b' [...] when with an ensure of bare - with revision raises an error when with an ensure of bare - without revision justs execute 'git clone --bare' when with an ensure of bare - without a source executes 'git init --bare' when with an ensure of mirror - with revision raises an error when with an ensure of mirror - without revision justs execute 'git clone --mirror' when with an ensure of mirror - without a source raises an exeption when with an ensure of mirror - with multiple remotes executes 'git clone --mirror' and set all remotes to mirror
1 parent 68b8ba5 commit 82299e4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

spec/unit/puppet/provider/vcsrepo/git_spec.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,9 @@ def branch_a_list(include_branch = nil?)
171171
provider.create
172172
end
173173
end
174+
end
174175

176+
context 'when with an ensure of bare' do
175177
context 'when with an ensure of bare - with revision' do
176178
it 'raises an error' do
177179
resource[:ensure] = :bare
@@ -202,7 +204,9 @@ def branch_a_list(include_branch = nil?)
202204
provider.create
203205
end
204206
end
207+
end
205208

209+
context 'when with an ensure of mirror' do
206210
context 'when with an ensure of mirror - with revision' do
207211
it 'raises an error' do
208212
resource[:ensure] = :mirror

0 commit comments

Comments
 (0)