class Fitting::Report::Tests
Public Class Methods
new(tests)
click to toggle source
# File lib/fitting/report/tests.rb, line 6 def initialize(tests) @tests = tests end
new_from_config(tests_path)
click to toggle source
# File lib/fitting/report/tests.rb, line 10 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
Public Instance Methods
push(test)
click to toggle source
# File lib/fitting/report/tests.rb, line 49 def push(test) @tests.push(test) end
size()
click to toggle source
# File lib/fitting/report/tests.rb, line 53 def size @tests.size end
to_a()
click to toggle source
# File lib/fitting/report/tests.rb, line 57 def to_a @tests end
to_h()
click to toggle source
# File lib/fitting/report/tests.rb, line 61 def to_h return @hash if @hash @hash = @tests.inject({}) do |res, test| res.merge!(test.id => test.to_h) end end
without_actions()
click to toggle source
# File lib/fitting/report/tests.rb, line 28 def without_actions @tests.inject([]) do |result, test| result.push("#{test.method} #{test.path}") unless test.is_there_an_actions? result end end
without_combinations()
click to toggle source
# File lib/fitting/report/tests.rb, line 42 def without_combinations @tests.inject([]) do |result, test| result.push(test.path) unless test.is_there_an_combinations? result end end
without_prefixes()
click to toggle source
# File lib/fitting/report/tests.rb, line 21 def without_prefixes @tests.inject([]) do |result, test| result.push(test.path) unless test.is_there_a_prefix? result end end
without_responses()
click to toggle source
# File lib/fitting/report/tests.rb, line 35 def without_responses @tests.inject([]) do |result, test| result.push(test.id) unless test.is_there_an_responses? result end end