Skip to content

Commit

Permalink
Rescue each spec individually
Browse files Browse the repository at this point in the history
  • Loading branch information
jnicklas committed Oct 3, 2011
1 parent b7ea6bd commit f5bf875
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions lib/evergreen/views/all.erb
Expand Up @@ -3,19 +3,21 @@
<script type="text/javascript" src="<%= url("/resources/evergreen.js") %>"></script>
<script type="text/javascript">
// <![CDATA[
<% begin %>
<%= @js_spec_helper.read.to_s + ";" if @js_spec_helper.exist? %>
<%= @coffee_spec_helper.read.to_s + ";" if @coffee_spec_helper.exist? %>
<% @suite.specs.each do |spec| %>
describe("<%= spec.name %>", function() { <%= spec.read %>; });
<% end %>
<% rescue StandardError => e %>
describe("failure", function() {
it("should not fail", function() {
throw(<%= "#{e.class}: #{e.message}".to_json %>);
describe("<%= spec.name %>", function() {
<% begin %>
<%= spec.read %>
<% rescue StandardError => e %>
describe("failure", function() {
it("should not fail", function() {
throw(<%= "#{e.class}: #{e.message}".to_json %>);
});
});
<% end %>
});
});
<% end %>
<% end %>
// ]]>
</script>

Expand Down

0 comments on commit f5bf875

Please sign in to comment.