lib/fitting/report/prefix.rb in fitting-3.0.2 vs lib/fitting/report/prefix.rb in fitting-4.0.0

- old
+ new

@@ -9,50 +9,33 @@ 'drafter' => :drafter_yaml_path, 'crafter' => :crafter_yaml_path, 'tomogram' => :tomogram_json_path }.freeze - attr_reader :name, :tests, :actions + attr_reader :name, :actions def initialize(schema_paths: nil, type: nil, name: '', skip: false, only: []) @name = name - @tests = Fitting::Report::Tests.new([]) - @skip = skip - return if skip + @cover = false @actions = Fitting::Report::Actions.new([]) + return if skip schema_paths.each do |path| tomogram = Tomograph::Tomogram.new(prefix: name, KEYS[type] => path) tomogram.to_a.filter! { |action| only.include?("#{action.method} #{action.path}") } if only.present? @actions.push(Fitting::Report::Actions.new(tomogram)) end end - def skip? - @skip + def cover! + @cover = true end - def details - if @skip - { - name: @name, - tests_size: @tests.size, - actions: { tests_without_actions: [], actions_details: [] } - } - else - { - name: @name, - tests_size: @tests.size, - actions: @actions.details(self) - } - end - end - - def add_test(test) - @tests.push(test) + def cover? + @cover end end end end