run all tests after focused run if console.log was used

This commit is contained in:
John Bintz 2011-06-24 15:57:00 -04:00
parent f82e3c0c2d
commit c67f8dbadf
6 changed files with 42 additions and 2 deletions

View File

@ -319,11 +319,21 @@ void HeadlessSpecRunner::timerEvent(QTimerEvent *event)
}
}
if ((exitCode == 0 && runnerFiles.count() == 0) || (exitCode != 0)) {
QApplication::instance()->exit(exitCode);
bool runAgain = true;
if (runnerFiles.count() == 0) {
runAgain = false;
} else {
if (exitCode == 1) {
runAgain = false;
}
}
if (runAgain) {
isFinished = false;
loadSpec();
} else {
QApplication::instance()->exit(exitCode);
}
}

View File

@ -88,6 +88,13 @@ describe "jasmine-headless-webkit" do
report.should be_a_report_containing(2, 0, false)
end
it "should succeed and run both, with the first having a console.log call" do
system %{bin/jasmine-headless-webkit -j spec/jasmine/filtered_success_with_console/filtered_success.yml --report #{report} ./spec/jasmine/filtered_success_with_console/success_one_spec.js}
$?.exitstatus.should == 2
report.should be_a_report_containing(2, 0, true)
end
end
end
end

View File

@ -0,0 +1,10 @@
src_files:
- spec/jasmine/filtered_success_with_console/src.js
spec_files:
- spec/jasmine/filtered_success_with_console/*_spec.js
src_dir: .
spec_dir: .

View File

@ -0,0 +1,7 @@
describe('success', function() {
it('should succeed', function() {
console.log("made it");
expect(true).toEqual(true);
});
});

View File

@ -0,0 +1,6 @@
describe('also success', function() {
it('should succeed', function() {
expect(true).toEqual(true);
});
});