abenari/rbovirt — Issue #1: Test suite fails
Author: voxik
Created: 2012-02-08 13:37:50+00:00
State: open

Hello, it seems that the test suite has some issues with nokogiri 1.5.0? It seems that Nokogiri accepts just Fixnum or Ranges, not ID's (symbols).

```
$ rspec spec/unit/vm_spec.rb
F.F

Failures:

1) OVIRT::VM xml parsing should parse VM xml
Failure/Error: vm = OVIRT::VM.new(nil, Nokogiri::XML(@xml).xpath('/'))
TypeError:
can't convert Symbol into Integer
# /builddir/build/BUILD/rubygem-rbovirt-0.0.5/usr/share/gems/gems/rbovirt-0.0.5/lib/ovirt/vm.rb:12:in `[]'
# /builddir/build/BUILD/rubygem-rbovirt-0.0.5/usr/share/gems/gems/rbovirt-0.0.5/lib/ovirt/vm.rb:12:in `initialize'
# /builddir/build/BUILD/rubygem-rbovirt-0.0.5/usr/share/gems/gems/rbovirt-0.0.5/spec/unit/vm_spec.rb:70:in `new'
# /builddir/build/BUILD/rubygem-rbovirt-0.0.5/usr/share/gems/gems/rbovirt-0.0.5/spec/unit/vm_spec.rb:70:in `block (3 levels) in '
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/example.rb:80:in `instance_eval'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/example.rb:80:in `block in run'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/example.rb:173:in `with_around_hooks'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/example.rb:77:in `run'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/example_group.rb:355:in `block in run_examples'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/example_group.rb:351:in `map'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/example_group.rb:351:in `run_examples'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/example_group.rb:337:in `run'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/example_group.rb:338:in `block in run'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/example_group.rb:338:in `map'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/example_group.rb:338:in `run'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/command_line.rb:28:in `block (2 levels) in run'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/command_line.rb:28:in `map'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/command_line.rb:28:in `block in run'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/reporter.rb:34:in `report'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/command_line.rb:25:in `run'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/runner.rb:80:in `run_in_process'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/runner.rb:69:in `run'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/runner.rb:10:in `block in autorun'

2) OVIRT::VM xml parsing should be running
Failure/Error: vm = OVIRT::VM.new(nil, Nokogiri::XML(@xml).xpath('/'))
TypeError:
can't convert Symbol into Integer
# /builddir/build/BUILD/rubygem-rbovirt-0.0.5/usr/share/gems/gems/rbovirt-0.0.5/lib/ovirt/vm.rb:12:in `[]'
# /builddir/build/BUILD/rubygem-rbovirt-0.0.5/usr/share/gems/gems/rbovirt-0.0.5/lib/ovirt/vm.rb:12:in `initialize'
# /builddir/build/BUILD/rubygem-rbovirt-0.0.5/usr/share/gems/gems/rbovirt-0.0.5/spec/unit/vm_spec.rb:81:in `new'
# /builddir/build/BUILD/rubygem-rbovirt-0.0.5/usr/share/gems/gems/rbovirt-0.0.5/spec/unit/vm_spec.rb:81:in `block (3 levels) in '
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/example.rb:80:in `instance_eval'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/example.rb:80:in `block in run'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/example.rb:173:in `with_around_hooks'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/example.rb:77:in `run'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/example_group.rb:355:in `block in run_examples'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/example_group.rb:351:in `map'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/example_group.rb:351:in `run_examples'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/example_group.rb:337:in `run'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/example_group.rb:338:in `block in run'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/example_group.rb:338:in `map'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/example_group.rb:338:in `run'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/command_line.rb:28:in `block (2 levels) in run'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/command_line.rb:28:in `map'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/command_line.rb:28:in `block in run'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/reporter.rb:34:in `report'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/command_line.rb:25:in `run'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/runner.rb:80:in `run_in_process'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/runner.rb:69:in `run'
# /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/runner.rb:10:in `block in autorun'

Finished in 0.00216 seconds
3 examples, 2 failures

Failed examples:

rspec ./spec/unit/vm_spec.rb:69 # OVIRT::VM xml parsing should parse VM xml
rspec ./spec/unit/vm_spec.rb:80 # OVIRT::VM xml parsing should be running
```