Sha256: e4158d656103a030712eb14141b09e14fbc4d25f7d2e04130aaac9a7bfca2e61
Contents?: true
Size: 1.34 KB
Versions: 2
Compression:
Stored size: 1.34 KB
Contents
require 'fitting/report/test' module Fitting module Report class Tests def initialize(tests) @tests = tests end def self.new_from_config(tests_path) tests = [] Dir[tests_path].each do |file| JSON.load(File.read(file)).map do |test| tests.push(Fitting::Report::Test.new(test)) end end tests.sort { |a, b| b.path <=> a.path } new(tests) end def without_prefixes @tests.inject([]) do |result, test| result.push(test.path) unless test.is_there_a_prefix? result end end def without_actions @tests.inject([]) do |result, test| result.push("#{test.method} #{test.path}") unless test.is_there_an_actions? result end end def without_responses @tests.inject([]) do |result, test| result.push("#{test.method} #{test.path}") unless test.is_there_an_responses? result end end def without_combinations @tests.inject([]) do |result, test| result.push(test.path) unless test.is_there_an_combinations? result end end def push(test) @tests.push(test) end def size @tests.size end def to_a @tests end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
fitting-2.14.1 | lib/fitting/report/tests.rb |
fitting-2.14.0 | lib/fitting/report/tests.rb |