Sha256: 0f03cc012f68b92e4d448f35acb281e277c84a6df12cd0860bc020f9e7883755

Contents?: true

Size: 912 Bytes

Versions: 38

Compression:

Stored size: 912 Bytes

Contents

require File.expand_path("#{File.dirname(__FILE__)}/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.trim_backtrace
  end

  def test_backtrace_tweaking
    skip "Skipped, because there is no Test::Unit::TestResult in this Test::Unit. Don't worry, this is totally fine." unless defined?(Test::Unit::TestResult)
    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

38 entries across 34 versions & 7 rubygems

Version Path
redinger-redinger-rr-0.10.3 spec/rr/test_unit/test_unit_backtrace_test.rb
redinger-rr-0.10.4 spec/rr/test_unit/test_unit_backtrace_test.rb
bitclust-core-0.5.3 vendor/bundle/ruby/1.9.1/gems/bitclust-core-0.5.3/vendor/bundle/ruby/1.9.1/gems/bitclust-core-0.5.1/vendor/bundle/ruby/1.9.1/gems/rr-1.0.4/spec/rr/test_unit/test_unit_backtrace_test.rb
bitclust-core-0.5.3 vendor/bundle/ruby/1.9.1/gems/bitclust-core-0.5.3/vendor/bundle/ruby/1.9.1/gems/rr-1.0.4/spec/rr/test_unit/test_unit_backtrace_test.rb
bitclust-core-0.5.3 vendor/bundle/ruby/1.9.1/gems/rr-1.0.4/spec/rr/test_unit/test_unit_backtrace_test.rb
bitclust-core-0.5.3 vendor/bundle/ruby/1.9.1/gems/bitclust-core-0.5.1/vendor/bundle/ruby/1.9.1/gems/rr-1.0.4/spec/rr/test_unit/test_unit_backtrace_test.rb
bitclust-core-0.5.2 vendor/bundle/ruby/1.9.1/gems/rr-1.0.4/spec/rr/test_unit/test_unit_backtrace_test.rb
bitclust-core-0.5.2 vendor/bundle/ruby/1.9.1/gems/bitclust-core-0.5.1/vendor/bundle/ruby/1.9.1/gems/rr-1.0.4/spec/rr/test_unit/test_unit_backtrace_test.rb
bitclust-core-0.5.1 vendor/bundle/ruby/1.9.1/gems/rr-1.0.4/spec/rr/test_unit/test_unit_backtrace_test.rb
mcmire-rr-1.0.5.rc1 spec/rr/test_unit/test_unit_backtrace_test.rb
messagebus_ruby_api-0.4.7 spec/ruby/1.9.1/gems/rr-1.0.2/spec/rr/test_unit/test_unit_backtrace_test.rb
messagebus_ruby_api-0.4.4 spec/ruby/1.9.1/gems/rr-1.0.2/spec/rr/test_unit/test_unit_backtrace_test.rb
rr-1.0.4 spec/rr/test_unit/test_unit_backtrace_test.rb
rr-1.0.3 spec/rr/test_unit/test_unit_backtrace_test.rb
vim-jar-0.1.2.0001 bundler/ruby/1.8/gems/rr-1.0.2/spec/rr/test_unit/test_unit_backtrace_test.rb
vim-jar-0.1.2 bundler/ruby/1.8/gems/rr-1.0.2/spec/rr/test_unit/test_unit_backtrace_test.rb
vim-jar-0.1.1 bundler/ruby/1.8/gems/rr-1.0.2/spec/rr/test_unit/test_unit_backtrace_test.rb
vim-jar-0.1.0 bundler/ruby/1.8/gems/rr-1.0.2/spec/rr/test_unit/test_unit_backtrace_test.rb
vim-jar-0.0.3 bundler/ruby/1.8/gems/rr-1.0.2/spec/rr/test_unit/test_unit_backtrace_test.rb
vim-jar-0.0.2 bundler/ruby/1.8/gems/rr-1.0.2/spec/rr/test_unit/test_unit_backtrace_test.rb