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:
[code]
it 'should return a form with "labelled_form" class' do
user = mock_model(User)
helper.labelled_form_for(user).should
have_tag('form[class=labeled_form]')
end
[/code]
but, I got a "The error occurred while evaluating nil.<< " right on I
call ...
[code]
form_for(record, *(args << options.merge(:builder =>
LabelledFormBuilder)), &proc)
[/code]
Well, when I test on the browser, no error ocurrs.
Someone can help?
thanks
on 2010-08-24 18:25
on 2010-08-25 02:11
On Aug 24, 2010, at 11:19 AM, Rafael Uchôa wrote: > it 'should return a form with "labelled_form" class' do > LabelledFormBuilder)), &proc) > [/code] > > Well, when I test on the browser, no error ocurrs. > > Someone can help? Please post the full spec, code, and error (with backtrace). Also, what versions of ruby, rails, rspec?
Please log in before posting. Registration is free and takes only a minute.
Existing account
(Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
Log in with Google account | Log in with Yahoo account
No account? Register here.