Closed larrylv closed 8 years ago
Related issue: https://github.com/killbill/killbill-java-parser/pull/9
With my patch in https://github.com/killbill/killbill-java-parser/pull/9, this spec should pass successfully.
module Killbill module Plugin module Model class EnumeratorIterator alias_method :hasNext, :has_next end end end end
Without the patch, it will raise an error:
1) Killbill::Plugin::ActiveMerchant::PaymentPlugin when skipping the gateway should support search_payments [8/46] Failure/Error: results = plugin.search_payments(@kb_payment_id, 0, 100, [], @call_context).to_a NoMethodError: undefined method `hasNext' for #<Killbill::Plugin::Model::EnumeratorIterator:0x3663d0ba> # file:/Users/Larry/.rbenv/versions/jruby-1.7.20/lib/jruby.jar!/jruby/java/java_ext/java.lang.rb:12:in `each' # ./spec/killbill/helpers/payment_plugin_spec.rb:318:in `(root)'
Also, the iterator should just be an iterator, instead of converting it in to_java method, which will not work in ruby codes.
to_java
:tada:
Related issue: https://github.com/killbill/killbill-java-parser/pull/9
With my patch in https://github.com/killbill/killbill-java-parser/pull/9, this spec should pass successfully.
Without the patch, it will raise an error:
Also, the iterator should just be an iterator, instead of converting it in
to_java
method, which will not work in ruby codes.