Sha256: 98c328d1657218f2a0344a1b25853320aaa40e03c329e7ffc9be065c054b503c
Contents?: true
Size: 873 Bytes
Versions: 11
Compression:
Stored size: 873 Bytes
Contents
require 'turnip_formatter/renderer/html/base' require 'ostruct' module TurnipFormatter module Renderer module Html # # @resource [Array<TurnipFormatter::Resource::Scenario::XXX>] # class StatisticsSpeed < Base def results @results ||= analysis(scenarios) end private # # Use the successfully steps only # def scenarios @scenarios ||= @resource.select { |s| s.status == :passed } end def analysis(scenarios) scenarios.map do |s| OpenStruct.new( { id: s.id, feature_name: s.feature.name, name: s.name, run_time: s.run_time } ) end.sort { |a, b| a.run_time <=> b.run_time } end end end end end
Version data entries
11 entries across 11 versions & 1 rubygems