lib/paraduct/test_response.rb in paraduct-1.0.0.beta6 vs lib/paraduct/test_response.rb in paraduct-1.0.0

- old
+ new

@@ -7,34 +7,34 @@ end delegate :push, :count, to: :jobs, prefix: true def successful? - @jobs.all?{ |result| result[:successful] } + @jobs.all? { |result| result[:successful] } end def failure? !successful? end def detail_message all_count = @jobs.count - successful_count = @jobs.select{ |result| result[:successful] }.count + successful_count = @jobs.count { |result| result[:successful] } failure_count = all_count - successful_count message = "======================================================\n" if successful_count > 0 message << "Passed:\n\n" - @jobs.select{ |result| result[:successful] }.each_with_index do |result, i| + @jobs.select { |result| result[:successful] }.each_with_index do |result, i| message << " #{i + 1}) #{result[:formatted_params]}\n" end message << "\n" end if failure_count > 0 message << "Failures:\n\n" - @jobs.select{ |result| !result[:successful] }.each_with_index do |result, i| + @jobs.select { |result| !result[:successful] }.each_with_index do |result, i| message << " #{i + 1}) #{result[:formatted_params]}\n" end message << "\n" end