Class: RailsDoctor::Adapters::TestRunner

Inherits:
Base
  • Object
show all
Defined in:
lib/rails_doctor/adapters/test_runner.rb

Constant Summary collapse

NAME =
"test_runner"

Instance Attribute Summary

Attributes inherited from Base

#changed_files, #config, #profile, #project, #runner

Instance Method Summary collapse

Methods inherited from Base

#initialize, #name, #run

Constructor Details

This class inherits a constructor from RailsDoctor::Adapters::Base

Instance Method Details

#available?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/rails_doctor/adapters/test_runner.rb', line 12

def available?
  !command.to_s.strip.empty?
end

#commandObject



8
9
10
# File 'lib/rails_doctor/adapters/test_runner.rb', line 8

def command
  config.command("test")
end

#install_guidanceObject



20
21
22
# File 'lib/rails_doctor/adapters/test_runner.rb', line 20

def install_guidance
  "Run rails-doctor init and choose the project test command, for example bin/rails test or bundle exec rspec."
end

#unavailable_reasonObject



16
17
18
# File 'lib/rails_doctor/adapters/test_runner.rb', line 16

def unavailable_reason
  "No test command is configured in .rails-doctor.yml."
end