Fix some problems with merge.

This commit is contained in:
xian 2009-08-14 18:04:52 -07:00
parent ab65914233
commit e9126fdd9b
3 changed files with 7 additions and 3 deletions

View File

@ -59,7 +59,7 @@ jasmine.TrivialReporter.prototype.reportRunnerResults = function(runner) {
jasmine.TrivialReporter.prototype.reportSuiteResults = function(suite) {
var results = suite.getResults();
var status = results.passed() ? 'passed' : 'failed';
var status = results.passed ? 'passed' : 'failed';
if (results.totalCount == 0) { // todo: change this to check results.skipped
status = 'skipped';
}
@ -68,7 +68,7 @@ jasmine.TrivialReporter.prototype.reportSuiteResults = function(suite) {
jasmine.TrivialReporter.prototype.reportSpecResults = function(spec) {
var results = spec.getResults();
var status = results.passed() ? 'passed' : 'failed';
var status = results.passed ? 'passed' : 'failed';
if (results.skipped) {
status = 'skipped';
}

View File

@ -20,6 +20,9 @@
<script type="text/javascript" src="../src/Suite.js"></script>
<script type="text/javascript" src="../src/mock-timeout.js"></script>
<script type="text/javascript" src="../lib/TrivialReporter.js"></script>
<script type="text/javascript">
jasmine.include('suites/EnvTest.js', true);
jasmine.include('suites/ExceptionsTest.js', true);
@ -31,6 +34,7 @@
jasmine.include('suites/RunnerTest.js', true);
jasmine.include('suites/SpecRunningTest.js', true);
jasmine.include('suites/SpyTest.js', true);
jasmine.include('suites/TrivialReporterTest.js', true);
</script>
<link href="../lib/jasmine.css" rel="stylesheet"/>

View File

@ -23,7 +23,7 @@ describe("TrivialReporter", function() {
trivialReporter = new jasmine.TrivialReporter({ body: body });
trivialReporter.reportRunnerStarting({
getAllSuites: function() {
return [ new jasmine.Suite(null, "suite 1", null, null) ];
return [ new jasmine.Suite({}, "suite 1", null, null) ];
}
});