Sha256: 9de140ccaf9dfd0db7e033f71052755e5c2b13ce151e1285e32bf743dca5ea19

Contents?: true

Size: 1.03 KB

Versions: 2

Compression:

Stored size: 1.03 KB

Contents

Feature: Inspect with source location

  Kernel#ql works just like Kernel#pp from the built-in pp library,
  except that it writes to $stderr, _and_ it prints the source
  location.

  Scenario: Inspect an object
    Given a file named "example.rb" with:
      """
      require "cute_print"
      ql "abc"
      """
    Then stderr should be
      """
      example.rb:2: "abc"

      """

  Scenario: Inspect two objects
    Given a file named "example.rb" with:
      """
      require "cute_print"
      ql "abc", 123
      """
    Then stderr should be
      """
      example.rb:2: "abc"
      example.rb:2: 123

      """

  Scenario: Inspect with location
    Given a file named "example.rb" with:
      """
      require "cute_print"
      ql {1 + 2}
      """
    Then stderr should be
      """
      example.rb:2: (1 + 2) is 3

      """

  Scenario: Just print the location
    Given a file named "example.rb" with:
      """
      require "cute_print"
      ql
      """
    Then stderr should be
      """
      example.rb:2

      """

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
cute_print-0.3.0 features/inspect/inspect_with_location.feature
cute_print-0.2.0 features/inspect/inspect_with_location.feature