class Pronto::Rspec

Runner RSpec with pronto

Public Instance Methods

inspect_file(file) click to toggle source
# File lib/pronto/rspec.rb, line 23
def inspect_file(file)
  exec("rspec #{file}")
end
run() click to toggle source
# File lib/pronto/rspec.rb, line 9
def run
  files = ruby_patches.map(&:new_file_full_path)

  return [] unless files

  files.select { |file| valid_file?(file) }
       .map { |file| inspect_file(file) }
       .flatten.compact
end
valid_file?(file) click to toggle source
# File lib/pronto/rspec.rb, line 19
def valid_file?(file)
  file.file? && file.basename.to_s.include?('spec.rb')
end