use the jasmine pretty printer if available

This commit is contained in:
John Bintz 2011-06-07 14:55:31 -04:00
parent b06fb6f101
commit 0426fc57cc
4 changed files with 12 additions and 1 deletions

View File

@ -8,5 +8,6 @@ gem 'fakefs', :require => nil
gem 'guard'
gem 'guard-rspec'
gem 'guard-shell'
gem 'guard-coffeescript'
gem 'growl'
gem 'rake', '0.8.7'

View File

@ -21,3 +21,5 @@ def compile
end
compile
guard 'coffeescript', :input => 'jasmine'

View File

@ -221,6 +221,8 @@ void HeadlessSpecRunner::log(const QString &msg)
}
std::cout << "[console] ";
clear();
if (msg.contains("\n"))
std::cout << std::endl;
std::cout << qPrintable(msg);
std::cout << std::endl;
}

View File

@ -36,7 +36,13 @@ module Jasmine
<head>
<title>Jasmine Test Runner</title>
<script type="text/javascript">
window.console = { log: function(data) { JHW.log(JSON.stringify(data)); } };
window.console = { log: function(data) {
if (jasmine) {
JHW.log(jasmine.pp(data))
} else {
JHW.log(JSON.stringify(data));
}
} };
</script>
#{files.join("\n")}
</head>