Class: DeltaTest::CLI::SpecsCommand
Constant Summary
Constants inherited
from CommandBase
CommandBase::DEFAULT_OPTIONS
Instance Method Summary
collapse
Methods inherited from CommandBase
#bundler_enabled?, #exec_with_data, #exit_with_message, #initialize, #invoke, #parse_options!
Instance Method Details
#invoke! ⇒ Object
9
10
11
12
13
14
15
16
17
18
19
20
21
|
# File 'lib/delta_test/cli/specs_command.rb', line 9
def invoke!
if stats.base_commit
puts 'Base commit: %s' % [stats.base_commit]
puts
else
raise StatsNotFoundError
end
list.load_table!(stats.table_file_path)
list.retrive_changed_files!(stats.base_commit)
print_specs
end
|
#list ⇒ Object
27
28
29
|
# File 'lib/delta_test/cli/specs_command.rb', line 27
def list
@list ||= RelatedSpecList.new
end
|
#print_specs ⇒ Object
31
32
33
34
35
36
37
38
39
|
# File 'lib/delta_test/cli/specs_command.rb', line 31
def print_specs
files = list.related_spec_files.to_a
if files.any?
puts files
else
puts '(no spec files to run)'
end
end
|
#stats ⇒ Object
23
24
25
|
# File 'lib/delta_test/cli/specs_command.rb', line 23
def stats
@stats ||= Stats.new
end
|