search for: pagescontrollertest

Displaying 2 results from an estimated 2 matches for "pagescontrollertest".

2010 Aug 09
0
Expanding tests with own methods
I want to call the method ''url_for'' in my functional test. e.g. assert_select "a[href=?]", url_for(:action => :new), :text => ''Neue Seite'' The book I am reading suggests doing this: class PagesControllerTest < ActionController::TestCase def setup def self.url_for(options, *parameters_for_method_reference) options.merge! :only_path => true @controller.url_for(options, *parameters_for_method_reference) end end ... end Why is it necessary to define ''url_for'' within t...
2009 Jan 26
0
undefined method error for a polymorphic route
Hi, I''m trying to upgrade a 2.0.2 app to 2.2.2, but first I decided to upgrade to 2.1.2 after reading some posts recommending to do this. After firing up the app and running my tests, I now see that my polymorphic routes seem to be broken. test_should_create_footerpage(PagesControllerTest): NoMethodError: undefined method `footerpage_url'' for #<PagesController: 0x4814648 > C:/InstantRails2/rails_apps/real_estate_application_2/vendor/rails/ actionpac k/lib/action_controller/polymorphic_routes.rb:105:in `send!'' Has anyone run into anything like this? --~--...