Пример #1
0
        public void Install_bundler_dependencies()
        {
            // arrange
            FullPathToCommandExecuted = Path.GetFullPath(Path.Combine(".",
                                                                      COMMAND_EXECUTED_TXT));

            // act
            RubyProcess.InstallBundlerDependencies();

            // assert
            CommandExecuted
            .Should()
            .Be("install");
        }
Пример #2
0
        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");
        }
Пример #3
0
        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");
        }
Пример #4
0
        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");
        }