spec/integration_helper.rb in braid-1.0.14 vs spec/integration_helper.rb in braid-1.0.15

- old
+ new

@@ -6,21 +6,21 @@ require 'fileutils' require 'pathname' TMP_PATH = File.join(Dir.tmpdir, 'braid_integration') EDITOR_CMD = "#{TMP_PATH}/editor" -EDITOR_CMD_PREFIX = "GIT_EDITOR=#{EDITOR_CMD}" +EDITOR_CMD_PREFIX = "export GIT_EDITOR=#{EDITOR_CMD};" BRAID_PATH = Pathname.new(File.dirname(__FILE__)).parent.realpath FIXTURE_PATH = File.join(BRAID_PATH, 'spec', 'fixtures') FileUtils.rm_rf(TMP_PATH) FileUtils.mkdir_p(TMP_PATH) BRAID_BIN = ((defined?(JRUBY_VERSION) || Gem.win_platform?) ? 'ruby ' : '') + File.join(BRAID_PATH, 'bin', 'braid') def set_editor_message(message = 'Make some changes') File.write(EDITOR_CMD, <<CMD) #!/usr/bin/env ruby -File.write(ARGV[0], #{message.inspect}) +File.open(ARGV[0], 'w') { |file| file.write(#{message.inspect}) } CMD FileUtils.chmod 0755, EDITOR_CMD end def assert_no_diff(file1, file2)