Sha256: e89ea11b989e9b422a9e955dbfd784422b70a8818941e5f9bdfd5c02f9bc2b26

Contents?: true

Size: 753 Bytes

Versions: 16

Compression:

Stored size: 753 Bytes

Contents

dir = File.dirname(__FILE__)
require "#{dir}/test_helper"

class TestUnitBacktraceTest < Test::Unit::TestCase
  def setup
    super
    @subject = Object.new
  end

  def teardown
    super
  end

  def test_trim_backtrace_is_set
    assert RR::Space.trim_backtrace
  end

  def test_backtrace_tweaking
    old_result = @_result
    result = Test::Unit::TestResult.new

    error_display = nil
    result.add_listener(Test::Unit::TestResult::FAULT) do |f|
      error_display = f.long_display
    end
    test_case = self.class.new(:backtrace_tweaking)
    test_case.run(result) {}

    assert !error_display.include?("lib/rr")
  end

  def backtrace_tweaking
    mock(@subject).foobar
    RR::Space::instance.verify_double(@subject, :foobar)
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
rr-0.3.10 examples/rr/test_unit/test_unit_backtrace_test.rb
rr-0.3.11 examples/rr/test_unit/test_unit_backtrace_test.rb
rr-0.4.2 spec/rr/test_unit/test_unit_backtrace_test.rb
rr-0.3.5 examples/rr/test_unit/test_unit_backtrace_test.rb
rr-0.3.6 examples/rr/test_unit/test_unit_backtrace_test.rb
rr-0.4.5 spec/rr/test_unit/test_unit_backtrace_test.rb
rr-0.4.4 spec/rr/test_unit/test_unit_backtrace_test.rb
rr-0.3.8 examples/rr/test_unit/test_unit_backtrace_test.rb
rr-0.4.8 spec/rr/test_unit/test_unit_backtrace_test.rb
rr-0.3.9 examples/rr/test_unit/test_unit_backtrace_test.rb
rr-0.4.0 spec/rr/test_unit/test_unit_backtrace_test.rb
rr-0.4.1 spec/rr/test_unit/test_unit_backtrace_test.rb
rr-0.4.3 spec/rr/test_unit/test_unit_backtrace_test.rb
rr-0.3.7 examples/rr/test_unit/test_unit_backtrace_test.rb
rr-0.4.7 spec/rr/test_unit/test_unit_backtrace_test.rb
rr-0.4.6 spec/rr/test_unit/test_unit_backtrace_test.rb