class Retest::Command::Ruby
Attributes
all[R]
file_system[R]
Public Class Methods
new(all:, file_system: FileSystem)
click to toggle source
# File lib/retest/command/ruby.rb, line 6 def initialize(all:, file_system: FileSystem) @file_system = file_system @all = all end
Public Instance Methods
run_all(*files, runner:)
click to toggle source
# File lib/retest/command/ruby.rb, line 11 def run_all(*files, runner:) paths = files.map { |file| "require './#{file}';" }.join runner.run %Q{-e "#{paths}"} end
to_s()
click to toggle source
# File lib/retest/command/ruby.rb, line 16 def to_s if file_system.exist? 'Gemfile.lock' 'bundle exec ruby <test>' else 'ruby <test>' end end