Sha256: 192f5c98059b02347c8f2a017b02c092968ff3098831714beaa1f1ea0035dacb

Contents?: true

Size: 369 Bytes

Versions: 15

Compression:

Stored size: 369 Bytes

Contents

module Mocha
  class BacktraceFilter
    LIB_DIRECTORY = File.expand_path(File.join(File.dirname(__FILE__), '..')) + File::SEPARATOR

    def initialize(lib_directory = LIB_DIRECTORY)
      @lib_directory = lib_directory
    end

    def filtered(backtrace)
      backtrace.reject { |location| File.expand_path(location).start_with?(@lib_directory) }
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
mocha-2.7.1 lib/mocha/backtrace_filter.rb
mocha-2.7.0 lib/mocha/backtrace_filter.rb
mocha-2.6.1 lib/mocha/backtrace_filter.rb
mocha-2.6.0 lib/mocha/backtrace_filter.rb
mocha-2.5.0 lib/mocha/backtrace_filter.rb
mocha-2.4.5 lib/mocha/backtrace_filter.rb
mocha-2.4.4 lib/mocha/backtrace_filter.rb
mocha-2.4.3 lib/mocha/backtrace_filter.rb
mocha-2.4.2 lib/mocha/backtrace_filter.rb
mocha-2.4.1 lib/mocha/backtrace_filter.rb
mocha-2.4.0 lib/mocha/backtrace_filter.rb
mocha-2.2.0 lib/mocha/backtrace_filter.rb
mocha-2.1.0 lib/mocha/backtrace_filter.rb
mocha-2.0.4 lib/mocha/backtrace_filter.rb
mocha-2.0.3 lib/mocha/backtrace_filter.rb