Sha256: 01afba53fdfeec341872799900f3d8a061f44434a9e65a9257b6e69b0bc50795
Contents?: true
Size: 1.01 KB
Versions: 3
Compression:
Stored size: 1.01 KB
Contents
#!/usr/bin/env ruby # frozen_string_literal: true require 'thor' require 'English' $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..', 'lib') # Executable for Generic Test class Exe < Thor desc 'page page_url', 'Test web page' def page(page_url) ENV['PAGE_URL'] = page_url test_file_path = File.join(File.dirname(__FILE__), '..', 'spec', 'generic_test_spec.rb') raise "no file at #{test_file_path}" unless File.exist? test_file_path desc = ENV['PAGE_URL'].split('://').last.tr('/', '_') junit_format = "-f RspecJunitFormatter --out logs/page_#{desc}.xml" ENV['REPORT_PATH'] = "reports/#{desc}" html_format = '--require generic_test/html_reporter -f RspecHtmlReporter' command = "rspec #{test_file_path} --format documentation --color #{junit_format} #{html_format}" raise $CHILD_STATUS.to_s unless system command end desc 'version', 'Version of generic_test' def version require 'generic_test' puts "GenericTest version #{GenericTest::VERSION}" end end Exe.start(ARGV)
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
generic_test-0.2.0 | exe/generic_test |
generic_test-0.1.13 | exe/generic_test |
generic_test-0.1.12 | exe/generic_test |