Sha256: fbfa080283b877ea3015412ddc599b0f3fd01fe104818335a0f261f5678d04bb

Contents?: true

Size: 518 Bytes

Versions: 6

Compression:

Stored size: 518 Bytes

Contents

#!/usr/bin/env rspec
# Test the bus class
require_relative "spec_helper"

require "dbus"

describe "BusTest" do
  before(:each) do
    @bus = DBus::ASessionBus.new
    @svc = @bus.service("org.ruby.service")
    @svc.object("/").introspect
  end

  it "tests introspection not leaking" do
    # peek inside the object to see if a cleanup step worked or not
    some_hash = @bus.instance_eval { @method_call_replies || {} }
    # fail: "there are leftover method handlers"
    expect(some_hash.size).to eq(0)
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
ruby-dbus-0.17.0 spec/bus_spec.rb
ruby-dbus-0.16.0 spec/bus_spec.rb
ruby-dbus-0.15.0 spec/bus_spec.rb
ruby-dbus-0.14.1 spec/bus_spec.rb
ruby-dbus-0.14.0 spec/bus_spec.rb
ruby-dbus-0.13.0 spec/bus_spec.rb