Sha256: 713c5244eebf740db7e8096c9761ca1ff32072d67c52deaaeb6a1efbbf5f36ff

Contents?: true

Size: 851 Bytes

Versions: 4

Compression:

Stored size: 851 Bytes

Contents

# Copyright (c) 2015 AppNeta, Inc.
# All rights reserved.

require 'minitest_helper'

class TracingModeTest  < Minitest::Test
  def setup
    TraceView::Config[:tracing_mode] = :always
  end

  def test_dont_start_trace_when_through
    skip

    TraceView::Config[:tracing_mode] = :through

    TV::API.start_trace(:test_through) do
      TraceView.tracing?.must_equal false
    end
  end

  def test_trace_when_always
    skip

    TraceView::Config[:tracing_mode] = :always

    TV::API.start_trace(:test_always) do
      TraceView.tracing?.must_equal true
    end
  end

  def test_dont_trace_when_never
    skip

    TraceView::Config[:tracing_mode] = :never

    TV::API.start_trace(:test_never) do
      TraceView.tracing?.must_equal false
    end

    TV::API.start_trace('asdf') do
      TraceView.tracing?.must_equal false
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
traceview-3.8.3-java test/support/tracing_mode_test.rb
traceview-3.8.3 test/support/tracing_mode_test.rb
traceview-3.8.2-java test/support/tracing_mode_test.rb
traceview-3.8.2 test/support/tracing_mode_test.rb