Sha256: cfaf947417912d374f69a5a8d2ffc227e3fb6f7c9a38c83b3639e6897420cabe

Contents?: true

Size: 775 Bytes

Versions: 3

Compression:

Stored size: 775 Bytes

Contents

# encoding: utf-8
# This file is distributed under New Relic's license terms.
# See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.

require File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'test_helper'))
require 'new_relic/transaction_sample/fake_segment'
class NewRelic::TransactionSample::FakeSegmentTest < MiniTest::Unit::TestCase
  def test_fake_segment_creation
    NewRelic::TransactionSample::FakeSegment.new(0.1, 'Custom/test/metric', nil)
  end

  def test_parent_segment
    # should be public in this class, but not in the parent class
    s = NewRelic::TransactionSample::FakeSegment.new(0.1, 'Custom/test/metric', nil)
    s.parent_segment = 'foo'
    assert_equal('foo', s.instance_eval { @parent_segment } )
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
newrelic_rpm-3.7.2.195 test/new_relic/transaction_sample/fake_segment_test.rb
newrelic_rpm-3.7.2.192 test/new_relic/transaction_sample/fake_segment_test.rb
newrelic_rpm-3.7.2.190.beta test/new_relic/transaction_sample/fake_segment_test.rb