exe/generic_test in generic_test-0.1.4 vs exe/generic_test in generic_test-0.1.5

- old
+ new

@@ -1,25 +1,21 @@ #!/usr/bin/env ruby # frozen_string_literal: true require 'thor' $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..', 'lib') -require 'generic_test' # Executable for Generic Test class Exe < Thor desc 'page page_url', 'Test web page' def page(page_url) ENV['PAGE_URL'] = page_url - puts File.join(File.dirname(__FILE__)) 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 - command = "rspec #{test_file_path} --format documentation --require generic_test/setup" - puts command - #require_relative '../lib/generic_test/setup' - system command # "rspec #{test_file_path} --format documentation --require generic_test" - #puts `rspec #{test_file_path} --format documentation --require generic_test` + desc = ENV['PAGE_URL'].split('://').last + command = "rspec #{test_file_path} --format documentation --require generic_test/setup --color --format RspecJunitFormatter --out logs/page_#{desc}.xml" + system command end end Exe.start(ARGV) \ No newline at end of file