Sha256: ef89136cad2104eba045b20f7493c167ad98dcaf27d1175de9a5a1586783bcd1

Contents?: true

Size: 457 Bytes

Versions: 23

Compression:

Stored size: 457 Bytes

Contents

require 'mocha/backtrace_filter'
require 'mocha/expectation_error'

module Mocha
  class ExpectationErrorFactory
    class << self
      attr_accessor :exception_class
      def build(message = nil, backtrace = [])
        self.exception_class ||= ExpectationError
        exception = exception_class.new(message)
        filter = BacktraceFilter.new
        exception.set_backtrace(filter.filtered(backtrace))
        exception
      end
    end
  end
end

Version data entries

23 entries across 18 versions & 3 rubygems

Version Path
mocha-0.12.10 lib/mocha/expectation_error_factory.rb
mocha-0.12.9 lib/mocha/expectation_error_factory.rb
mocha-0.12.8 lib/mocha/expectation_error_factory.rb
challah-rolls-0.2.0 vendor/bundle/gems/challah-0.8.0.pre/vendor/bundle/gems/mocha-0.12.2/lib/mocha/expectation_error_factory.rb
challah-rolls-0.2.0 vendor/bundle/gems/mocha-0.12.2/lib/mocha/expectation_error_factory.rb
challah-rolls-0.2.0 vendor/bundle/gems/mocha-0.12.3/lib/mocha/expectation_error_factory.rb
challah-rolls-0.2.0 vendor/bundle/gems/challah-0.8.3/vendor/bundle/gems/mocha-0.12.3/lib/mocha/expectation_error_factory.rb
challah-0.8.3 vendor/bundle/gems/mocha-0.12.3/lib/mocha/expectation_error_factory.rb
mocha-0.12.7 lib/mocha/expectation_error_factory.rb
mocha-0.12.6 lib/mocha/expectation_error_factory.rb
mocha-0.12.5 lib/mocha/expectation_error_factory.rb
challah-0.8.1 vendor/bundle/gems/mocha-0.12.3/lib/mocha/expectation_error_factory.rb
mocha-0.12.4 lib/mocha/expectation_error_factory.rb
challah-rolls-0.1.0 vendor/bundle/gems/mocha-0.12.3/lib/mocha/expectation_error_factory.rb
challah-rolls-0.1.0 vendor/bundle/gems/challah-0.8.0.pre/vendor/bundle/gems/mocha-0.12.2/lib/mocha/expectation_error_factory.rb
challah-rolls-0.1.0 vendor/bundle/gems/mocha-0.12.2/lib/mocha/expectation_error_factory.rb
challah-0.8.0.pre vendor/bundle/gems/mocha-0.12.2/lib/mocha/expectation_error_factory.rb
challah-0.7.1 vendor/bundle/gems/mocha-0.12.2/lib/mocha/expectation_error_factory.rb
challah-0.7.0 vendor/bundle/gems/mocha-0.12.2/lib/mocha/expectation_error_factory.rb
challah-0.7.0.pre2 vendor/bundle/gems/mocha-0.12.2/lib/mocha/expectation_error_factory.rb