Use jasmine CSS, and get rid of HTML in plain text stacktrace
This commit is contained in:
parent
331730f8f5
commit
457b5a011f
@ -121,7 +121,7 @@ module Jasmine
|
||||
out << "\n"
|
||||
|
||||
unless message["passed"]
|
||||
stack_trace = message["trace"]["stack"]
|
||||
stack_trace = message["trace"]["stack"].gsub(/<br \/>/, "\n").gsub(/<\/?b>/, " ")
|
||||
STDERR << stack_trace.gsub(/\(.*\)@http:\/\/localhost:[0-9]+\/specs\//, "/spec/")
|
||||
STDERR << "\n"
|
||||
end
|
||||
|
@ -8,7 +8,7 @@
|
||||
<script src="/jasmine/lib/TrivialReporter.js"></script>
|
||||
<script src="/specs/javascripts/screw-jasmine-compat.js"></script>
|
||||
<script type="text/javascript"></script>
|
||||
<link href="/core/jasmine.css" rel="stylesheet"/>
|
||||
<link href="/jasmine/lib/jasmine.css" rel="stylesheet"/>
|
||||
<script type="text/javascript">
|
||||
var jasmineEnv = jasmine.getEnv();
|
||||
var jsApiReporter = new jasmine.JsApiReporter();
|
||||
|
@ -42,7 +42,7 @@ jasmine.TrivialReporter.prototype.reportSpecResults = function(spec) {
|
||||
for (var i = 0; i < resultItems.length; i++) {
|
||||
var result = resultItems[i];
|
||||
if (!result.passed) {
|
||||
var resultMessageDiv = this.createDom('div', {className: 'resultMessage'});
|
||||
var resultMessageDiv = this.createDom('div', {className: 'resultMessage fail'});
|
||||
resultMessageDiv.innerHTML = result.message; // todo: lame; mend
|
||||
specDiv.appendChild(resultMessageDiv);
|
||||
specDiv.appendChild(this.createDom('div', {className: 'stackTrace'}, result.trace.stack));
|
||||
|
@ -14,11 +14,11 @@ p {
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
p.fail {
|
||||
.fail {
|
||||
background: url( ../images/fail-16.png ) no-repeat;
|
||||
color: red;
|
||||
}
|
||||
|
||||
p.fail_in_summary {
|
||||
.fail_in_summary {
|
||||
color: red;
|
||||
}
|
Loading…
Reference in New Issue
Block a user