Sha256: 2f833fe8da10e9c447b7fc336293c730d464363d1cd727b4f14275427f79cc33
Contents?: true
Size: 566 Bytes
Versions: 6
Compression:
Stored size: 566 Bytes
Contents
module Defekt class Collection def initialize(klass) @klass = klass end def all @all ||= @klass.descendants.flat_map do |klass| klass.instance_methods.grep(/^test_/).map do |methot| Test.new(klass.instance_method(methot)) end end end def passed @passed ||= all.select(&:passed?) end def failed @failed ||= all.select(&:failed?) end def errored @errored ||= all.select(&:errored?) end def broken @broken ||= all.select(&:broken?) end end end
Version data entries
6 entries across 6 versions & 1 rubygems