Class: TestLauncher::Frameworks::Implementation::Collection

Inherits:
SimpleDelegator
  • Object
show all
Defined in:
lib/test_launcher/frameworks/implementation/collection.rb

Instance Method Summary collapse

Instance Method Details

#examples_found?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/test_launcher/frameworks/implementation/collection.rb', line 17

def examples_found?
  results.any?(&:is_example?)
end

#file_countObject



9
10
11
# File 'lib/test_launcher/frameworks/implementation/collection.rb', line 9

def file_count
  results.group_by(&:file).size
end

#last_editedObject



21
22
23
# File 'lib/test_launcher/frameworks/implementation/collection.rb', line 21

def last_edited
  results.sort_by(&:mtime).last
end

#one_example?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/test_launcher/frameworks/implementation/collection.rb', line 13

def one_example?
  examples_found? && results.size == 1
end