File: remote_shortcut_test.rb

package info (click to toggle)
ruby-byebug 11.1.3-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,252 kB
  • sloc: ruby: 8,835; ansic: 1,662; sh: 6; makefile: 4
file content (34 lines) | stat: -rw-r--r-- 724 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# frozen_string_literal: true

require_relative "test_helper"
require_relative "support/remote_debugging_tests"

module Byebug
  #
  # Tests the remote debugging shortcut.
  #
  class RemoteShortcutTest < TestCase
    include RemoteDebuggingTests

    def program
      strip_line_numbers <<-RUBY
         1:  require "byebug"
         2:
         3:  module Byebug
         4:    #
         5:    # Toy class to test remote debugging
         6:    #
         7:    class #{example_class}
         8:      def a
         9:        3
        10:      end
        11:    end
        12:
        13:    remote_byebug("127.0.0.1")
        14:
        15:    #{example_class}.new.a
        16:  end
      RUBY
    end
  end
end