This is a cross post from the fg mailing list but the traffic is very
low
there so I thought I’d try here, too.
While running a test with Cukes/FG, I pre populate a table
(event_categories), run my test and it passes on a successful failure
(duplicate record)
When the controller executes … render {:action => :new}, I get the
following error …
You have a nil object when you didn’t expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.inject
(ActionView::TemplateError)
On line #10 of app/views/event_types/_form.html.erb
in my create action, I was repopulating the event_categories list after
a
successful save. In this instance, I was actually testing for a failure
so
the list never got touched.
Believe me, if I had a nugget of inspiration, I would’ve informed the
list.
Sorry for the vagueness in my solved reply.
-ants
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.