bin/check-test-suite.rb in sensu-plugins-rspec-0.0.1.alpha.4 vs bin/check-test-suite.rb in sensu-plugins-rspec-0.0.1

- old
+ new

@@ -149,10 +149,10 @@ tests[path]['metadata'] = `cd #{ path } && /usr/bin/git show #{ tests[path]['commit'] }` case tests[path]['exitstatus'] when 2 test_suite_lines = tests[path]['test_suite_out'].split("\n") - test_suite_out_fail_line = test_suite_lines.index(test_suite_lines.select { |line| line.include?('Failures:') }.first) + test_suite_out_fail_line = test_suite_lines.index(test_suite_lines.find { |line| line.include?('Failures:') }) write_file_cache_message commit_file, 'failure' # To eliminate false positives, we run a failing suite twice before sending the response next if File.read(commit_file).scan(/failure/).count < 2