Skip to content

Commit 6efa0a6

Browse files
author
Kevin Paulisse
committed
Add tests around logger
1 parent 9fc00c6 commit 6efa0a6

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

spec/octocatalog-diff/tests/util/scriptrunner_spec.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
}
3737
obj = described_class.new(opts)
3838
expect(obj.script).to eq(__FILE__)
39+
expect(@logger_str.string).to match(/Selecting.+scriptrunner_spec.rb from override script path/)
3940
end
4041

4142
it 'should use default script when override is not found' do
@@ -48,6 +49,7 @@
4849
obj = described_class.new(opts)
4950
answer = File.expand_path('../../../../scripts/git-extract/git-extract.sh', File.dirname(__FILE__))
5051
expect(obj.script).to eq(answer)
52+
expect(@logger_str.string).to match(/Did not find.+git-extract.sh in override script path/)
5153
end
5254

5355
it 'should use default script when override is not provided' do
@@ -59,6 +61,7 @@
5961
obj = described_class.new(opts)
6062
answer = File.expand_path('../../../../scripts/git-extract/git-extract.sh', File.dirname(__FILE__))
6163
expect(obj.script).to eq(answer)
64+
expect(@logger_str.string).to eq('')
6265
end
6366
end
6467
end

0 commit comments

Comments
 (0)