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 void No_ssl_start() { // arrange var thin = new ThinServerProcess(thinPort: 1224, workingDirectory: "."); _tcpListener = new TcpListener(IPAddress.Any, 1224); _tcpListener.Start(); // act thin.StartThinServer(); thin.RubyProc.WaitForExit(); // assert CommandExecuted .Should() .Be(@".\thin start -R config.ru -p 1224 -V"); }
public void Ssl_start() { // arrange var thin = new ThinServerProcess(thinPort: 1224, workingDirectory: ".") { ThinSslCertFile = "certfile", ThinSslKeyFile = "keyfile" }; _tcpListener = new TcpListener(IPAddress.Any, 1224); _tcpListener.Start(); // act thin.StartThinServer(); thin.RubyProc.WaitForExit(); // assert CommandExecuted .Should() .Be(@".\thin start -R config.ru -p 1224 -V --ssl --ssl-key-file keyfile --ssl-cert-file certfile"); }