Hey Leonardo.
Thanks for your reply.
Here is what my steps are
*my_file.erb*
<%= radio_button_tag "radio", "primary_office_#{count}"
%>
*something.feature*
Scenario: Radio button steps
When I choose "radio_primary_office_2"
*webrat_steps.rb*
When /^I choose "([^\"]*)"$/ do |field|
choose(field)
end
*Error:*
When I choose "radio_primary_office_2" #
features/step_definitions/webrat_steps.rb:110
You have a nil object when you didn''t expect it!
The error occurred while evaluating nil.fields (NoMethodError)
Thanks
Abhis
On Thu, Dec 24, 2009 at 8:13 PM, Leonardo Mateo
<leonardomateo-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote:
> On Thu, Dec 24, 2009 at 8:01 AM, Abhishek shukla
<betterabhi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> wrote:
> > Hello Friends
> > While testing for the radio button getting the following error
> >
> > ERB
> >
> > <%= radio_button_tag "radio",
"primary_office_#{count}",
> > is_primary_office(office.id) %>
> >
> > When I choose "radio_primary_office_2" #
> > features/step_definitions/webrat_steps.rb:110
> > You have a nil object when you didn''t expect it!
> > The error occurred while evaluating nil.fields (NoMethodError)
> > (eval):2:in `/^I choose "([^\"]*)"$/''
> >
> > Please let me know where i am getting wrong.
>
> Can you post your step implementation?
>
>
> --
> Leonardo Mateo.
> There''s no place like ~
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To unsubscribe from this group, send email to
>
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
> .
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>
>
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.