mattetti / Weasel-Diesel

DSL to describe, document and test web services
MIT License
438 stars 21 forks source link

JSON generation problems #22

Closed filemon closed 11 years ago

filemon commented 11 years ago

to_json method has to accept additional parameters. Otherwise the below mentioned exception is thrown when trying to generate a json in some cases.

wrong number of arguments (1 for 0) /Users/jirifabian/.rvm/gems/ruby-2.0.0-p0/gems/weasel_diesel-1.2.1/lib/response.rb:354:in to_json' /Users/jirifabian/.rvm/gems/ruby-2.0.0-p0/gems/weasel_diesel-1.2.1/lib/response.rb:88:into_json' /Users/jirifabian/.rvm/gems/ruby-2.0.0-p0/gems/weasel_diesel-1.2.1/lib/response.rb:88:in `to_json'

filemon commented 11 years ago

code snippet causing issues -> https://gist.github.com/filemon/5309833

kamui commented 11 years ago

I no longer get an exception here, but the first array is ignored. This will fixed by #18.