require 'rubygems' require 'rspec' require 'mocha/api' require 'tempfile' require 'fileutils' require 'pathname' TMP_PATH = File.join(Dir.tmpdir, 'braid_integration') EDITOR_CMD = "#{TMP_PATH}/editor" EDITOR_CMD_PREFIX = "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, <