lib/capy.rb in capy-1.5.0 vs lib/capy.rb in capy-1.6.0

- old
+ new

@@ -31,19 +31,17 @@ evaluator.visit Capybara.app_host if Capybara.app_host if args.empty? start_shell evaluator else - args.each do |script_file| - unless File.exists?(script_file) - puts "No such file: #{script_file}".red - return 1 - end - puts "Running: #{script_file} ..." - result = evaluator.eval_script File.read(script_file), mode, script_file - puts "=> #{result.inspect}".cyan - start_shell evaluator if opts.stop? + script_file = args.shift + unless File.exists?(script_file) + puts "No such file: #{script_file}".red + return 1 end + result = evaluator.eval_script File.read(script_file), mode, script_file + puts "=> #{result.inspect}".cyan + start_shell evaluator if opts.stop? end 0 rescue Slop::InvalidOptionError => e puts e.message.red