[rspec-users] Testing my_form_for in a FormBuilder test

Rafael Uchôa uchoaaa at googlemail.com
Tue Aug 24 12:19:17 EDT 2010

Hi there,

I'm developing a FormBuilder (let's say LabelledFormBuilder), and I
created a helper called labelled_form_for to put the ":builder =>
LabelledFormBuilder" in options and call the original form_for, like
suggested on the Rails API ( http://liten.be//0EBtc ).

I wrote this test:

    it 'should return a form with "labelled_form" class' do
      user = mock_model(User)

but, I got a "The error occurred while evaluating nil.<< " right on I
call ...
  form_for(record, *(args << options.merge(:builder =>
LabelledFormBuilder)), &proc)

Well, when I test on the browser, no error ocurrs.

Someone can help?


More information about the rspec-users mailing list