Sha256: c8990898cd98bd9d1deadc6f60f89d54d2cceed2e36d16814960ce745131537b

Contents?: true

Size: 810 Bytes

Versions: 12

Compression:

Stored size: 810 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 < Test::Unit::TestCase
  def test_fake_segment_creation
    assert_nothing_raised do
      NewRelic::TransactionSample::FakeSegment.new(0.1, 'Custom/test/metric', nil)
    end
  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

12 entries across 12 versions & 1 rubygems

Version Path
newrelic_rpm-3.7.1.188 test/new_relic/transaction_sample/fake_segment_test.rb
newrelic_rpm-3.7.1.182 test/new_relic/transaction_sample/fake_segment_test.rb
newrelic_rpm-3.7.1.180 test/new_relic/transaction_sample/fake_segment_test.rb
newrelic_rpm-3.7.0.177 test/new_relic/transaction_sample/fake_segment_test.rb
newrelic_rpm-3.7.0.174.beta test/new_relic/transaction_sample/fake_segment_test.rb
newrelic_rpm-3.6.9.171 test/new_relic/transaction_sample/fake_segment_test.rb
newrelic_rpm-3.6.8.168 test/new_relic/transaction_sample/fake_segment_test.rb
newrelic_rpm-3.6.8.164 test/new_relic/transaction_sample/fake_segment_test.rb
newrelic_rpm-3.6.7.159 test/new_relic/transaction_sample/fake_segment_test.rb
newrelic_rpm-3.6.7.159.beta test/new_relic/transaction_sample/fake_segment_test.rb
newrelic_rpm-3.6.7.152 test/new_relic/transaction_sample/fake_segment_test.rb
newrelic_rpm-3.6.6.147 test/new_relic/transaction_sample/fake_segment_test.rb