public void Install_bundler_dependencies() { // arrange FullPathToCommandExecuted = Path.GetFullPath(Path.Combine(".", COMMAND_EXECUTED_TXT)); // act RubyProcess.InstallBundlerDependencies(); // assert CommandExecuted .Should() .Be("install"); }
public void Start_ruby_process() { // arrange const string workingDirectory = @"..\..\workingdir"; FullPathToCommandExecuted = Path.GetFullPath(Path.Combine(workingDirectory, COMMAND_EXECUTED_TXT)); var process = new RubyProcess(workingDirectory: workingDirectory); // act process.StartRubyProcess("shutdownscript script args"); process.RubyProc.WaitForExit(); // assert CommandExecuted .Should() .Be("script args"); }
public static RubyArray /*!*/ OpenPipe( RubyContext /*!*/ context, object self, [DefaultProtocol, NotNull] MutableString /*!*/ command) { Process process = RubyProcess.CreateProcess(context, command, true, true, true); RubyArray result = new RubyArray(); result.Add(new RubyIO(context, null, process.StandardInput, IOMode.WriteOnly)); result.Add(new RubyIO(context, process.StandardOutput, null, IOMode.ReadOnly)); result.Add(new RubyIO(context, process.StandardError, null, IOMode.ReadOnly)); if (context.RubyOptions.Compatibility >= RubyCompatibility.Ruby19) { result.Add(ThreadOps.RubyThreadInfo.FromThread(System.Threading.Thread.CurrentThread)); } return(result); }
public static void FixtureSetup() { RubyProcess.InstallBundlerDependencies(); }