File: pry_ext_test.rb

package info (click to toggle)
ruby-pry-byebug 3.9.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 324 kB
  • sloc: ruby: 1,171; makefile: 4
file content (25 lines) | stat: -rw-r--r-- 594 bytes parent folder | download
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
# frozen_string_literal: true

require "test_helper"

class PryExtTest < MiniTest::Spec
  let(:output) { StringIO.new }
  let(:input) { InputTester.new }

  describe "when disable-pry called" do
    subject { redirect_pry_io(input, output) { load test_file("multiple") } }
    before { input.add "disable-pry" }
    after { ENV.delete("DISABLE_PRY") }

    it "keeps pry's default behaviour" do
      subject
      assert_equal 1, output.string.scan(/binding\.pry/).size
    end

    it "does not start byebug" do
      Byebug.stop
      subject
      assert !Byebug.started?
    end
  end
end