-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_specrunner.erb
More file actions
61 lines (48 loc) · 1.86 KB
/
_specrunner.erb
File metadata and controls
61 lines (48 loc) · 1.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<!DOCTYPE html>
<html>
<head>
<!-- The test runners are run out of the build directory, but lets make
everything relative to the project root -->
<base href="<%= base_root %>" />
<title><%= @target %>: Spec Runner</title>
<link rel="shortcut icon" type="image/png" href="<%= jasmine_root %>/jasmine_favicon.png">
<link rel="stylesheet" type="text/css" href="<%= jasmine_root %>/jasmine.css">
<script type="text/javascript" src="<%= jasmine_root %>/jasmine.js"></script>
<script type="text/javascript" src="<%= jasmine_root %>/jasmine-html.js"></script>
<script type="text/javascript" src="<%= base_root %>/jasmine-console-runner.js"></script>
<script type="text/javascript" src="<%= base_root %>/spec_helper.js"></script>
<!-- BEGIN DYNAMIC SCRIPT VALUES -->
<% @scripts.each do |script_name| %>
<script type="text/javascript" src="<%= script_name %>"></script>
<% end %>
<!-- END DYNAMIC SCRIPT VALUES -->
<script type="text/javascript">
(function() {
var jasmineEnv = jasmine.getEnv();
jasmineEnv.updateInterval = 1000;
var htmlReporter = new jasmine.HtmlReporter();
// jasmineEnv.addReporter(htmlReporter);
// Use the trivial reporter for tie in with the run-jasmine.js script
jasmineEnv.addReporter(new jasmine.TrivialReporter());
// Use the console reporter for printing results directly to console for
// headless testing
jasmineEnv.addReporter(new jasmine.ConsoleReporter());
jasmineEnv.specFilter = function(spec) {
return htmlReporter.specFilter(spec);
};
var currentWindowOnload = window.onload;
window.onload = function() {
if (currentWindowOnload) {
currentWindowOnload();
}
execJasmine();
};
function execJasmine() {
jasmineEnv.execute();
}
})();
</script>
</head>
<body>
</body>
</html>