Sha256: 86276d7bd7a93592675935dae01338eefb7a22fb80fbccf5f5d1ca583464b361
Contents?: true
Size: 1.02 KB
Versions: 8
Compression:
Stored size: 1.02 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 source 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
8 entries across 8 versions & 1 rubygems