Sha256: 70d0f6b153150cfab96721deda2b6dd88dc47a66317acdf8a2279e614b991e66
Contents?: true
Size: 1.62 KB
Versions: 20
Compression:
Stored size: 1.62 KB
Contents
#!/usr/bin/env ruby # frozen_string_literal: true require 'optparse' require_relative '../lib/learn_test' options = {} OptionParser.new do |opts| opts.banner = 'Usage: learn [options]' opts.on('--sync', 'Report test results synchronously') do |s| options[:sync] = s end opts.on('-d', '--debug', 'Output errors during results synchronization') do |d| options[:debug] = d end opts.on('-n', '--[no-]color', 'Turn off color output') do |c| options[:color] = c end opts.on('-f', '--format') do |f| options[:format] = f end opts.on('-l', '--local', "Don't push results to Learn") do |l| options[:local] = l end opts.on('-b', '--browser', 'Run tests in browser') do |b| options[:browser] = b end opts.on('-o', '--out FILE') do |o| options[:out] = o end opts.on('-s', '--skip') do |s| options[:skip] = s end opts.on('-t', '--test') do |t| options[:test] = t end opts.on('-v', '--version') do |v| puts LearnTest::VERSION exit end opts.on('--keep', "Don't delete test output files") do |k| options[:keep] = true end opts.on('--fail-fast', 'Stop running test suite on first failed test') do |f| options[:fail_fast] = f end opts.on('-e', '--example STRING', 'Run examples whose full nested names include STRING (may be used more than once)') do |s| (options[:example] ||= []) << s end if ARGV.any? { |arg| arg == 'init' } options[:init] = true end options[:argv] = ARGV end.parse! repo = options[:test] ? 'git@github.com:flatiron-school/a-sample-repo.git' : LearnTest::RepoParser.get_repo LearnTest::Runner.new(repo, options).run
Version data entries
20 entries across 20 versions & 1 rubygems