File: base_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 (20 lines) | stat: -rw-r--r-- 408 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# frozen_string_literal: true

require "test_helper"

#
# Checks current pry-byebug's context.
#
class BaseTest < MiniTest::Spec
  def test_main_file_context
    Pry.stub :eval_path, "<main>" do
      assert PryByebug.file_context?(TOPLEVEL_BINDING)
    end
  end

  def test_other_file_context
    Pry.stub :eval_path, "something" do
      refute PryByebug.file_context?(TOPLEVEL_BINDING)
    end
  end
end