app/views/teabag/spec/index.html.erb in teabag-0.4.0 vs app/views/teabag/spec/index.html.erb in teabag-0.4.1
- old
+ new
@@ -3,18 +3,22 @@
<head>
<title>Teabag :: Javascript Test Runner</title>
<%= stylesheet_link_tag *@suite.stylesheets %>
<%= javascript_include_tag_for_teabag *@suite.javascripts %>
<%= csrf_meta_tags %>
+ <meta name="viewport" content="width=device-width, user-scalable=no">
<script type="text/javascript">
- window.originalOnload = window.onload
+ window.originalOnload = window.onload;
window.onload = function() {
if (window.originalOnload) window.originalOnload();
+ // pass relevant info to javascript
+ Teabag.version = <%=raw Teabag::VERSION.inspect %>;
+ Teabag.root = <%=raw Teabag.configuration.mount_at.inspect %>;
+ Teabag.suites = <%=raw @suite.suites.to_json %>;
+
// start the execution of the specs
- Teabag.version = "<%= Teabag::VERSION %>";
- Teabag.fixturePath = "<%= Teabag.configuration.mount_at %>/fixtures";
- Teabag.execute()
+ Teabag.execute();
}
</script>
</head>
<body>
<div id="teabag-fixtures"></div>