Sha256: d5c340c1fdfa4745f4e581cafae3147457d6c448345885a398d18f1de8032205

Contents?: true

Size: 514 Bytes

Versions: 6

Compression:

Stored size: 514 Bytes

Contents

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

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

6 entries across 6 versions & 1 rubygems

Version Path
ruby-dbus-openplacos-0.7.2.2 test/bus_driver_test.rb
ruby-dbus-openplacos-0.7.2.1 test/bus_driver_test.rb
ruby-dbus-openplacos-0.7.2 test/bus_driver_test.rb
ruby-dbus-openplacos-0.7.0 test/bus_driver_test.rb
ruby-dbus-openplacos-0.6.2 test/bus_driver_test.rb
ruby-dbus-openplacos-0.6.1 test/bus_driver_test.rb