Class: LearnTest::Pytest::PytestChecker

Inherits:
Object
  • Object
show all
Defined in:
lib/learn_test/strategies/pytest/requirements_checker.rb

Class Method Summary collapse

Class Method Details

.checkObject



48
49
50
51
52
53
# File 'lib/learn_test/strategies/pytest/requirements_checker.rb', line 48

def self.check
  return if self.pytest_installed?

  puts 'Please ensure pytest is installed'
  exit
end

.pytest_installed?Boolean

Returns:

  • (Boolean)


55
56
57
# File 'lib/learn_test/strategies/pytest/requirements_checker.rb', line 55

def self.pytest_installed?
  !`which pytest`.empty?
end