Sha256: 21170c4e9ee6484f776f989f76e4b7b0bbeacdbab80f0b9115135c861f900e55

Contents?: true

Size: 1.44 KB

Versions: 3

Compression:

Stored size: 1.44 KB

Contents

Feature: Trema::Controller#logger.debug
  Background:
    Given I set the environment variables to:
      | variable         | value |
      | TREMA_LOG_DIR    | .     |
      | TREMA_PID_DIR    | .     |
      | TREMA_SOCKET_DIR | .     |
    And a file named "hello.rb" with:
      """ruby
      class Hello < Trema::Controller
        def start(_args)
          logger.debug 'Konnichi Wa'
        end
      end
      """

  @sudo
  Scenario: the default logging level
    When I trema run "hello.rb" interactively
    And sleep 2
    And I trema killall "Hello"
    Then the output should not contain "Konnichi Wa"
    And the file "Hello.log" should not contain "DEBUG -- : Konnichi Wa"

  @sudo
  Scenario: --logging_level debug
    When I run `trema run hello.rb --logging_level debug` interactively
    And sleep 2
    And I trema killall "Hello"
    Then the output should contain "Konnichi Wa"
    And the file "Hello.log" should contain "DEBUG -- : Konnichi Wa"

  @sudo
  Scenario: -v
    When I run `trema -v run hello.rb` interactively
    And sleep 2
    And I trema killall "Hello"
    Then the output should contain "Konnichi Wa"
    And the file "Hello.log" should contain "DEBUG -- : Konnichi Wa"

  @sudo
  Scenario: --verbose
    When I run `trema --verbose run hello.rb` interactively
    And sleep 2
    And I trema killall "Hello"
    Then the output should contain "Konnichi Wa"
    And the file "Hello.log" should contain "DEBUG -- : Konnichi Wa"

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
trema-0.10.1 features/logger/debug.feature
trema-0.10.0 features/logger/debug.feature
trema-0.9.0 features/logger/debug.feature