Hi Guys,
I've been trying to figure this out for a few days now. To better
describe what I'm experiencing
I've created a very simple github rails project at
http://github.com/flsafe/test
Check out the README on the github project page.
This project has just two models. A user and and Image. A user has
many images.
To see what I'm talking about one would clone the project with:
git clone g...@github.com:flsafe/test.git
Then run:
rake cucumber
The output will contain a description of the values I'm expecting in
the
'params' variable in the controller.
I know it's a lot to ask to checkout the project. I'm sure everyone is
very busy.
But I would really appreciate it after trying to figure this out for a
few days.
Thanks
On May 10, 3:45 pm, Frank <
francisco.li...@gmail.com> wrote:
> I've made some slight progress towards solving this. I switched from
> Ruby 1.9.1 to ruby 1.8.7 and it solved the issue for several nested
> file fields.
> However, now I'm struggling with nested 'file_field'(s). I'm using
> webrat 0.7.1, cucumber 0.7.2, rails 2.3.5 and ruby 1.8.7-p249
>
> It is the same kind of error. I'm expecting an array of file fields in
> 'params'
>
> 'key'=>["#<ActionController::TestUploadedFile:0x267bec8>"]
>
> but instead I get one string that looks like:
>
> key=>"#<ActionController::TestUploadedFile:0x267bec8>"
>
> I tried writing a few webrat specs to try and reproduce the problem
> but I haven't had any luck. I was wondering if anyone is familiar with
> what can cause "Expecting array but getting string" type errors.
>
> I'm experiencing something similar to this closed ticket:
https://webrat.lighthouseapp.com/projects/10503/tickets/341-attach_fi...
>
> And this past post:
http://groups.google.com/group/webrat/browse_thread/thread/a08a1cf4e8...