Sha256: b0cb61e6196be0cda4fd55202f2ad8abeb694fea65a740c9d4190d45b456784e

Contents?: true

Size: 821 Bytes

Versions: 6

Compression:

Stored size: 821 Bytes

Contents

module Byebug
  class DisplayTestCase < TestCase
    def setup
      @example = -> do
        d = 0
        byebug
        d = d + 3
        d = d + 6
      end

      super
    end

    def test_shows_expressions
      enter 'display d + 1'
      debug_proc(@example)
      check_output_includes '1: d + 1 = 1'
    end

    def test_works_when_using_a_shortcut
      enter 'disp d + 1'
      debug_proc(@example)
      check_output_includes '1: d + 1 = 1'
    end

    def test_saves_displayed_expressions
      enter 'display d + 1'
      debug_proc(@example) { assert_equal [[true, 'd + 1']], state.display }
    end

    def test_displays_all_expressions_available
      enter 'display d', 'display d + 1', 'display'
      debug_proc(@example)
      check_output_includes '1: d = 0', '2: d + 1 = 1'
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
byebug-3.5.1 test/commands/display_test.rb
byebug-3.5.0 test/commands/display_test.rb
byebug-3.4.2 test/commands/display_test.rb
byebug-3.4.1 test/commands/display_test.rb
byebug-3.4.0 test/commands/display_test.rb
byebug-3.3.0 test/commands/display_test.rb