Tests in py_unit_adapter_spec and junit_adapter_spec repaired
This commit is contained in:
@ -143,8 +143,9 @@ describe DockerContainerPool do
|
|||||||
|
|
||||||
after(:each) { described_class.start_refill_task }
|
after(:each) { described_class.start_refill_task }
|
||||||
|
|
||||||
|
# changed from false to true
|
||||||
it 'creates an asynchronous task' do
|
it 'creates an asynchronous task' do
|
||||||
expect(Concurrent::TimerTask).to receive(:new).with(execution_interval: interval, run_now: false, timeout_interval: timeout).and_call_original
|
expect(Concurrent::TimerTask).to receive(:new).with(execution_interval: interval, run_now: true, timeout_interval: timeout).and_call_original
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'executes the task' do
|
it 'executes the task' do
|
||||||
|
@ -8,9 +8,10 @@ describe JunitAdapter do
|
|||||||
let(:count) { 42 }
|
let(:count) { 42 }
|
||||||
let(:failed) { 25 }
|
let(:failed) { 25 }
|
||||||
let(:stdout) { "FAILURES!!!\nTests run: #{count}, Failures: #{failed}" }
|
let(:stdout) { "FAILURES!!!\nTests run: #{count}, Failures: #{failed}" }
|
||||||
|
let(:error_matches) { [] }
|
||||||
|
|
||||||
it 'returns the correct numbers' do
|
it 'returns the correct numbers' do
|
||||||
expect(adapter.parse_output(stdout: stdout)).to eq(count: count, failed: failed)
|
expect(adapter.parse_output(stdout: stdout)).to eq(count: count, failed: failed, error_messages: error_matches)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -4,12 +4,12 @@ describe PyUnitAdapter do
|
|||||||
let(:adapter) { described_class.new }
|
let(:adapter) { described_class.new }
|
||||||
let(:count) { 42 }
|
let(:count) { 42 }
|
||||||
let(:failed) { 25 }
|
let(:failed) { 25 }
|
||||||
let(:error_messages) { [] }
|
let(:error_matches) { [] } }
|
||||||
let(:stderr) { "Ran #{count} tests in 0.1s\n\nFAILED (failures=#{failed})" }
|
let(:stderr) { "Ran #{count} tests in 0.1s\n\nFAILED (failures=#{failed})" }
|
||||||
|
|
||||||
describe '#parse_output' do
|
describe '#parse_output' do
|
||||||
it 'returns the correct numbers' do
|
it 'returns the correct numbers' do
|
||||||
expect(adapter.parse_output(stderr: stderr)).to eq(count: count, failed: failed, error_messages: error_messages)
|
expect(adapter.parse_output(stderr: stderr)).to eq(count: count, failed: failed, error_messages: error_matches)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user