-
Notifications
You must be signed in to change notification settings - Fork 117
/
specs.html.erb
39 lines (33 loc) · 1.06 KB
/
specs.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
<!doctype html>
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<title>Konacha Tests</title>
<%= stylesheet_link_tag "mocha", :debug => false %>
<%= stylesheet_link_tag "konacha", :debug => false %>
<%= javascript_include_tag "mocha", "chai", "konacha/#{Konacha.mode}", :debug => false %>
<%= javascript_include_tag("konacha_config", :debug => false) if Rails.application.assets.find_asset('konacha_config') %>
<script>
mocha.setup(Konacha.mochaOptions);
beforeEach(function () {
var e = document.getElementById('konacha'),
p = e.parentNode;
p.removeChild(e);
e = document.createElement("div");
e.id = "konacha";
p.appendChild(e);
});
var expect = chai.expect,
should = chai.should(),
assert = chai.assert;
window.onload = function () {
mocha.run();
};
</script>
<%= spec_include_tag *@specs %>
</head>
<body>
<div id="mocha"></div>
<div id="konacha"></div>
</body>
</html>