On Aug 9, 8:14 pm, Jim Burgess <li...@ruby-forum.com> wrote:

> assert_select "a[href=?]", @controller.url_for(:action => :new,
> :only_path => true), :text => 'Neue Seite'
>
> How is he able to reference a method defined in another class, simply by
> prefixing the method call with '@controller'
>
> Could someone explain what is '@controller' in this context?
>

it's an instance of the controller class that you're testing
(ActionController::TestCase sets one up for you)

Fred

-- 
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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to