Sha256: 4e0f9fe60c4ac29adf399f54159479f0ad783af000f63b8fd6bfb932b0752d80

Contents?: true

Size: 605 Bytes

Versions: 3

Compression:

Stored size: 605 Bytes

Contents

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

describe "IntrospectXMLParserTest" do
  it "tests split interfaces" do
    xml = <<EOS
<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>
EOS

    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.14.1 spec/introspect_xml_parser_spec.rb
ruby-dbus-0.14.0 spec/introspect_xml_parser_spec.rb
ruby-dbus-0.13.0 spec/introspect_xml_parser_spec.rb