This repository has been archived by the owner on Jan 16, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 274
/
run.html.erb
60 lines (50 loc) · 1.73 KB
/
run.html.erb
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type"/>
<title>Jasmine suite</title>
<link rel="shortcut icon" type="image/png" href="/__JASMINE_ROOT__/images/jasmine_favicon.png">
<% css_files.each do |css_file| %>
<link rel="stylesheet" href="<%= css_file %>" type="text/css" media="screen"/>
<% end %>
<% jasmine_files.each do |jasmine_file| %>
<script src="<%= jasmine_file %>" type="text/javascript"></script>
<% end %>
<% require_js.each do |require_file| %>
<script src="<%= require_file %>" type="text/javascript"></script>
<% end %>
<script type="text/javascript">
var jsApiReporter;
(function() {
function startJasmine(){
var jasmineEnv = jasmine.getEnv();
jsApiReporter = new jasmine.JsApiReporter();
var trivialReporter = new jasmine.TrivialReporter();
jasmineEnv.addReporter(jsApiReporter);
jasmineEnv.addReporter(trivialReporter);
jasmineEnv.specFilter = function(spec) {
return trivialReporter.specFilter(spec);
};
jasmineEnv.execute();
}
<% if require_js %>
require(['<%= js_files.join("','") %>'],function(){
require.ready(function(){
startJasmine();
})
});
<% else %>
window.onload = function() {
startJasmine();
};
<% end %>
})();
</script>
<% js_files.each do |js_file| %>
<script src="<%= js_file %>" type="text/javascript"></script>
<% end unless require_js %>
</head>
<body>
<div id="jasmine_content"></div>
</body>
</html>