Sha256: 21c4c3dea08a20255d5df5197c7f0ac088fe739ff586d0e112d250779f616da1

Contents?: true

Size: 596 Bytes

Versions: 5

Compression:

Stored size: 596 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, _ = 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

5 entries across 5 versions & 2 rubygems

Version Path
ruby-dbus-0.12.0 spec/introspect_xml_parser_spec.rb
ruby-dbus-0.11.2 spec/introspect_xml_parser_spec.rb
ruby-dbus-0.11.1 spec/introspect_xml_parser_spec.rb
em-ruby-dbus-0.11.0 test/introspect_xml_parser_spec.rb
ruby-dbus-0.11.0 test/introspect_xml_parser_spec.rb