From eb54a2b64a97fe511cb0fe55001188a10cbaf5f0 Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Mon, 26 Aug 2019 18:51:03 -0400 Subject: [PATCH] fix specs create_exe() on Windows --- spec/build_tests_spec.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/spec/build_tests_spec.rb b/spec/build_tests_spec.rb index cf1e328..d765590 100644 --- a/spec/build_tests_spec.rb +++ b/spec/build_tests_spec.rb @@ -65,6 +65,9 @@ describe Rscons do def create_exe(exe_name, contents) exe_file = "#{@build_test_run_dir}/_bin/#{exe_name}" + if RUBY_PLATFORM =~ /mingw/ + exe_file += ".bat" + end File.open(exe_file, "wb") do |fh| fh.puts("#!/bin/sh") fh.puts(contents)