Sha256: dc961b47edbd3fc6134c160c2a38dd982f5436e4ec2ed9b36049fc72413e24e5

Contents?: true

Size: 503 Bytes

Versions: 5

Compression:

Stored size: 503 Bytes

Contents

#!/usr/bin/env ruby
# Test the methods of the bus driver
require "test/unit"
require "dbus"

def d(msg)
  puts msg if $DEBUG
end

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

  def test_exists
    assert @svc.exists?, "could not find the service"
    nonsvc = @bus.service "org.ruby.nosuchservice"
    assert ! nonsvc.exists?, "found a service that should not exist"
  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
ruby-dbus-0.8.0 test/bus_driver_test.rb
ruby-dbus-0.7.2 test/bus_driver_test.rb
ruby-dbus-0.7.1 test/bus_driver_test.rb
ruby-dbus-0.7.0 test/bus_driver_test.rb
ruby-dbus-openplacos-0.6.0 test/bus_driver_test.rb