Sha256: befe2ec95fcb5aa1c0d7c2d490ea4e60fda9e041465db22b53c87dcc01bc9da0
Contents?: true
Size: 1.09 KB
Versions: 1
Compression:
Stored size: 1.09 KB
Contents
require File.expand_path(__FILE__ + '/../../../test_helper') functional_tests do test "fire a probe with no data and no block" do aClass = Class.new do include XRay::DTrace::Tracer end aClass.new.fire "a name" end test "fire a probe with data and no block" do aClass = Class.new do include XRay::DTrace::Tracer end aClass.new.fire "a name", "some data" end test "Can check whether ruby-probe is enabled" do aClass = Class.new do include XRay::DTrace::Tracer end assert [true, false].include?(aClass.new.enabled?) end test "fire a probe with block and no data" do anObject = Class.new do include XRay::DTrace::Tracer end.new result = anObject.firing("a-name") do :expected_result end assert_equal :expected_result, result end test "fire a probe with block and data" do anObject = Class.new do include XRay::DTrace::Tracer end.new result = anObject.firing("a-name", "some data") do :expected_result end assert_equal :expected_result, result end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
xray-1.1 | test/functional/dtrace/tracer_test.rb |