Sha256: 69d083c07f8de225f5aa13a2a145a9f4a6132a942d7fda3377f7a93ff7a0d37f

Contents?: true

Size: 502 Bytes

Versions: 6

Compression:

Stored size: 502 Bytes

Contents

#!/usr/bin/env ruby
# Test the bus class
require "test/unit"
require "dbus"

class BusTest < Test::Unit::TestCase
  def setup
    @bus = DBus::ASessionBus.new
    @svc = @bus.service("org.ruby.service")
    @svc.object("/").introspect
  end

  def test_introspection_not_leaking
    # peek inside the object to see if a cleanup step worked or not
    some_hash = @bus.instance_eval { @method_call_replies || Hash.new }
    assert_equal 0, some_hash.size, "there are leftover method handlers"
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
ruby-dbus-0.9.1 test/bus_test.rb
ruby-dbus-0.9.0 test/bus_test.rb
ruby-dbus-0.8.0 test/bus_test.rb
ruby-dbus-0.7.2 test/bus_test.rb
ruby-dbus-0.7.1 test/bus_test.rb
ruby-dbus-0.7.0 test/bus_test.rb