lib/snapdragon/views/run.erb in snapdragon-0.1.9 vs lib/snapdragon/views/run.erb in snapdragon-0.1.10

- old
+ new

@@ -1,10 +1,14 @@ <link rel="stylesheet" type="text/css" href="/jasmine-core/jasmine.css"> <script type="text/javascript" src="/jasmine-core/jasmine.js"></script> <script type="text/javascript" src="/jasmine-core/jasmine-html.js"></script> +<% if @suite.formatter == "junit" %> +<script type="text/javascript" src="/resources/SnapdragonJUnitReporter.js"></script> +<% else %> <script type="text/javascript" src="/resources/SnapdragonConsoleReporter.js"></script> +<% end %> <!-- The implementation code the spec files being tested need --> <% @suite.require_file_relative_url_paths.each do |path| %> <script type="text/javascript" src="<%= path %>"></script> <% end %> @@ -18,18 +22,22 @@ (function() { var jasmineEnv = jasmine.getEnv(); jasmineEnv.updateInterval = 1000; var htmlReporter = new jasmine.HtmlReporter(); - jasmineEnv.addReporter(htmlReporter); - var snapdragonConsoleReporter = new jasmine.SnapdragonConsoleReporter({}); - jasmineEnv.addReporter(snapdragonConsoleReporter); - jasmineEnv.specFilter = function(spec) { return htmlReporter.specFilter(spec); }; + + <% if @suite.formatter == "junit" %> + var snapdragonJUnitReporter = new jasmine.SnapdragonJUnitReporter(); + jasmineEnv.addReporter(snapdragonJUnitReporter); + <% else %> + var snapdragonConsoleReporter = new jasmine.SnapdragonConsoleReporter({}); + jasmineEnv.addReporter(snapdragonConsoleReporter); + <% end %> var currentWindowOnload = window.onload; window.onload = function() { if (currentWindowOnload) {