Sha256: 38b9633601102e09bdcfb58ff6d906cede5d83d688921ca8931236e2a868bce0
Contents?: true
Size: 1.08 KB
Versions: 1
Compression:
Stored size: 1.08 KB
Contents
require File.expand_path(__FILE__ + '/../../../../test_helper') unit_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/unit/xray/dtrace/tracer_test.rb |