Class: Ree::SpecRunner::View

Inherits:
Object
  • Object
show all
Defined in:
lib/ree/spec_runner/view.rb

Instance Method Summary collapse

Instance Method Details

#missing_specs_message(skipped_packages) ⇒ Object



15
16
17
# File 'lib/ree/spec_runner/view.rb', line 15

def missing_specs_message(skipped_packages)
  "NO SPECS FOUND FOR PACKAGES: \n#{skipped_packages.map { |x| " - #{x}" }.join("\n")}\n\n"
end

#no_specs_for_package(package_name) ⇒ Object



27
28
29
# File 'lib/ree/spec_runner/view.rb', line 27

def no_specs_for_package(package_name)
  "Package #{package_name} has no specs to execute!"
end

#package_not_found_message(package_name, prepared_command_params) ⇒ Object



11
12
13
# File 'lib/ree/spec_runner/view.rb', line 11

def package_not_found_message(package_name, prepared_command_params)
  "Package #{package_name} not found! \nPossible packages:\n\n#{packages_menu(prepared_command_params)}"
end

#packages_menu(prepared_command_params) ⇒ Object



4
5
6
7
8
9
# File 'lib/ree/spec_runner/view.rb', line 4

def packages_menu(prepared_command_params)
  prepared_command_params
    .sort_by(&:package_path)
    .map { |x| " - #{x.package_name} (#{x.spec_count} spec files)" }
    .join("\n")
end

#skipping_specs_message(skipped_packages) ⇒ Object



19
20
21
# File 'lib/ree/spec_runner/view.rb', line 19

def skipping_specs_message(skipped_packages)
  "FOLLOWING PACKAGES WERE SKIPPED BY .runignore FILE: \n#{skipped_packages.map { |x| " - #{x}" }.join("\n")}\n\n"
end

#specs_header_messageObject



23
24
25
# File 'lib/ree/spec_runner/view.rb', line 23

def specs_header_message
  "**** SPECS *****"
end