Files
chromebrew/tests/test_all
Yan Couto c4f97ee168 Moving constants to lib
Changelog:
- Moved crew string colorization to lib/color.rb
- Moved crew constants to lib/const.rb
- test_all can now be run from anywhere
- Tests are all relative now (no need to have a crew installation)
2017-09-01 21:16:34 -03:00

22 lines
430 B
Ruby
Executable File

#!/usr/bin/env ruby
require 'find'
require_relative '../lib/const'
require_relative '../lib/color'
CUR_DIR = File.dirname(__FILE__)
# Add >LOCAL< lib to LOAD_PATH
$LOAD_PATH.unshift "#{CUR_DIR}/../lib"
puts "Running tests..."
Find.find(CUR_DIR) do |filename|
if File.extname(filename) == '.rb'
puts "\nTest Name: #{File.basename(filename, ".rb")}"
load filename
end
end
puts "\nAll tests successful.".lightgreen