Sha256: ceb6dd60ffd2a204c876a0f6a2f2e587860a0fe741f51fda2011e365b1e9efe1

Contents?: true

Size: 667 Bytes

Versions: 3

Compression:

Stored size: 667 Bytes

Contents

#!/usr/bin/env rspec
require_relative "spec_helper"
require "dbus"

describe "IntrospectXMLParserTest" do
  it "tests split interfaces" do
    xml = <<-XML
      <node>
        <interface name="org.example.Foo">
          <method name="Dwim"/>
        </interface>
        <interface name="org.example.Bar">
          <method name="Drink"/>
        </interface>
        <interface name="org.example.Foo">
          <method name="Smurf"/>
        </interface>
      </node>
    XML

    interfaces, _subnodes = DBus::IntrospectXMLParser.new(xml).parse

    foo = interfaces.find { |i| i.name == "org.example.Foo" }
    expect(foo.methods.keys.size).to eq(2)
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ruby-dbus-0.17.0 spec/introspect_xml_parser_spec.rb
ruby-dbus-0.16.0 spec/introspect_xml_parser_spec.rb
ruby-dbus-0.15.0 spec/introspect_xml_parser_spec.rb