Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Including Gattica in Rails project makes post and put test methods stop working #1

Open
look opened this Issue Jul 26, 2009 · 7 comments

Comments

Projects
None yet
3 participants

look commented Jul 26, 2009

I can't figure out why this would be, but when I include the Gattica gem in my Rails project, my functional tests stop working.

I get this error message:

ArgumentError: wrong number of arguments (1 for 0)

when calling put or post.

Commenting out the inclusion of the Gattica gem fixes the problem.

I can't find a re-definition of put or post in the Gattica gem itself but maybe one of the libraries it includes does it.

Anyone else seen this?

look commented Jul 26, 2009

Ah, I get it.

Your version of Hash#stringify_keys is blowing away ActiveSupport's and causing the my tests to fail, because something like this:

post :create, :foo => 'bar'

calls stringify_keys.

look commented Jul 26, 2009

Jeremyf's fork fixes the problem by removing these methods, which aren't actually used anyway. I suggest pulling his changes.

http://github.com/jeremyf/gattica/tree/master

I have the same problem with Soap-Requests and using cannikin's gattica 0.4.0. Please tell me which methods in which files should I remove.

Example:


require 'soap/wsdlDriver'
wsdl = 'http://webservices.daehosting.com/services/isbnservice.wso?WSDL'
driver = SOAP::WSDLDriverFactory.new(wsdl).create_rpc_driver
response = driver.IsValidISBN13(:sISBN => '0000000000000')

require 'gattica'
require 'soap/wsdlDriver'
wsdl = 'http://webservices.daehosting.com/services/isbnservice.wso?WSDL'
driver = SOAP::WSDLDriverFactory.new(wsdl).create_rpc_driver
response = driver.IsValidISBN13(:sISBN => '0000000000000')


ArgumentError: wrong number of arguments (1 for 0)
from /usr/lib/ruby/1.8/xsd/charset.rb:122:in `key'

I deleted the key-mathod in core_extensions.rb and everything is fine.
I have no problems with Analytics and SOAP-Requests.

The jeremyf fork is still back at 0.3.8 - is there any chance of a 0.4.4 any time soon to fix this issue?

https://github.com/maggit/gattica has a fix for this based on 0.4.0

@jeremyf jeremyf pushed a commit to jeremyf/gattica that referenced this issue Apr 12, 2012

Chris Le Merge pull request #1 from john/master
Added VERSION constant to Gattica module.  Thank you john!
7c948c4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment