File: test_core_ext_helper.rb

package info (click to toggle)
ruby-power-assert 2.0.3-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 228 kB
  • sloc: ruby: 1,658; makefile: 5; sh: 4
file content (21 lines) | stat: -rw-r--r-- 362 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
require 'byebug'
require 'byebug/core'

class << PowerAssert
  prepend Module.new {
    def internal_file?(file)
      super or file == __FILE__
    end
  }
end

module PowerAssertTestHelper
  class TestProcessor < Byebug::CommandProcessor
    attr_reader :pa_context

    def at_line
      super
      @pa_context ||= PowerAssert.trace(frame)
    end
  end
end