Sha256: 198122808d596c63e9aba8517151ba9cf427f9952b872f362869f58ba5bf583b

Contents?: true

Size: 1.08 KB

Versions: 8

Compression:

Stored size: 1.08 KB

Contents

Feature: -S (--socket_dir) option

  -S (--socket_dir) option specifies the location to put socket files

  Background:
    Given a file named "null_controller.rb" with:
      """ruby
      class NullController < Trema::Controller; end
      """
  
  @sudo
  Scenario: -S option
    Given a socket directory named "sock"
    When I successfully run `trema run null_controller.rb -S sock -d`
    And I run `sleep 3`
    Then a socket file named "sock/NullController.ctl" should exist
    And a socket file named "sock/trema.NullController.ctl" should exist

  @sudo
  Scenario: --socket_dir option
    Given a socket directory named "sock"
    When I successfully run `trema run null_controller.rb --socket_dir sock -d`
    And I run `sleep 3`
    Then a socket file named "sock/NullController.ctl" should exist
    And a socket file named "sock/trema.NullController.ctl" should exist

  @sudo
  Scenario: "No such directory" error
    When I run `trema run null_controller.rb -S sock -d`
    Then the exit status should not be 0
    And the stderr should contain:
      """
      No such directory
      """

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
trema-0.8.4 features/trema_run/socket_dir_option.feature
trema-0.8.3 features/trema_run/socket_dir_option.feature
trema-0.8.2 features/trema_run/socket_dir_option.feature
trema-0.8.1 features/trema_run/socket_dir_option.feature
trema-0.8.0 features/trema_run/socket_dir_option.feature
trema-0.7.1 features/trema_run/socket_dir_option.feature
trema-0.7.0 features/trema_run/socket_dir_option.feature
trema-0.6.0 features/trema_run/socket_dir_option.feature