dwf/rva: Added examples, fixed bug with initializing currentSuite with a mock.

This commit is contained in:
pivotal
2008-12-03 17:11:05 -08:00
parent e025755a61
commit 00f5f1722c
7 changed files with 113 additions and 24 deletions

View File

@@ -5,7 +5,7 @@
<title>Jasmine Tests</title>
<script type="text/javascript" src="prototype-1.6.0.3.js"></script>
<script type="text/javascript" src="../lib/jasmine.js"></script>
<link type="text/css" rel="stylesheet" href="test.css"/>
<link type="text/css" rel="stylesheet" href="../lib/jasmine.css"/>
<script type="text/javascript" src="bootstrap.js"></script>
</head>
<body onLoad="runTests();">

4
test/bootstrap.js vendored
View File

@@ -91,6 +91,8 @@ var testMatchersReporting = function () {
}
var testSpecs = function () {
var currentSuite = describe('default current suite', function() {});
var spec = it('new spec');
reporter.test((spec.description == 'new spec'),
"Spec did not have a description");
@@ -508,7 +510,7 @@ var testRunner = function() {
it('should be a test');
});
reporter.test((runner.suites.length === 2),
"Runner expected two suites");
"Runner expected two suites, but got " + runner.suites.length);
runner = Runner();
describe('one suite description', function () {

View File

@@ -1,24 +0,0 @@
body {
font: 14px "Helvetica Neue Light", "Lucida Grande", "Calibri", "Arial", sans-serif;
padding-left: 40px;
}
h1 {
padding-top: 20px;
font-weight: bold;
font: 24px; /* "Helvetica Neue Light", "Lucida Grande", "Calibri", "Arial", sans-serif; */
}
p {
margin-top: 5px;
padding-left: 20px;
}
p.fail {
background: url(../images/exclamation.png) no-repeat;
color: red;
}
p.fail_in_summary {
color: red;
}