[Kde-bindings] qtruby and mocha

Paolo Capriotti p.capriotti at gmail.com
Sun Feb 14 11:09:15 UTC 2010


Using mocha (http://mocha.rubyforge.org/) on QtRuby objects results in
the following error:

ArgumentError: wrong number of arguments (1 for 0)
    /var/lib/gems/1.8/gems/mocha-0.9.8/lib/mocha/instance_method.rb:8:in
`public_methods'
    /var/lib/gems/1.8/gems/mocha-0.9.8/lib/mocha/instance_method.rb:8:in
`method_exists?'
    /var/lib/gems/1.8/gems/mocha-0.9.8/lib/mocha/class_method.rb:30:in
`hide_original_method'
    /var/lib/gems/1.8/gems/mocha-0.9.8/lib/mocha/class_method.rb:15:in `stub'
    /var/lib/gems/1.8/gems/mocha-0.9.8/lib/mocha/central.rb:13:in `stub'
    /var/lib/gems/1.8/gems/mocha-0.9.8/lib/mocha/object.rb:61:in `expects'
    /var/lib/gems/1.8/gems/mocha-0.9.8/lib/mocha/argument_iterator.rb:15:in
`call'
    /var/lib/gems/1.8/gems/mocha-0.9.8/lib/mocha/argument_iterator.rb:15:in
`each'
    /var/lib/gems/1.8/gems/mocha-0.9.8/lib/mocha/object.rb:57:in `expects'
    ./test/test_utils.rb:28:in `test_painter_bracket'
    /var/lib/gems/1.8/gems/mocha-0.9.8/lib/mocha/integration/test_unit/ruby_version_186_and_above.rb:19:in
`__send__'
    /var/lib/gems/1.8/gems/mocha-0.9.8/lib/mocha/integration/test_unit/ruby_version_186_and_above.rb:19:in
`run'

This is because public_methods should take an optional argument. The
attached patch fixes the problem.

Paolo Capriotti
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mocha-qtruby.patch
Type: text/x-patch
Size: 525 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-bindings/attachments/20100214/ae4d814e/attachment.patch>


More information about the Kde-bindings mailing list