module Testdiff

Tests modified files

The current version of this gem

Constants

VERSION

Public Instance Methods

run(tests) click to toggle source
# File lib/testdiff.rb, line 9
def run(tests)
  if tests.empty?
    run(%w[rubocop rspec])
  else
    tests.each do |test|
      run_test(test)
      puts
    end
  end
end
run_test(test) click to toggle source

private

# File lib/testdiff.rb, line 22
def run_test(test)
  case test.to_s.downcase
  when 'rubocop'
    Rubocop.run
  when 'rspec'
    Rspec.run
  else
    puts "Unknown test: #{test}."
  end
end