search for: applicationcontrollertest

Displaying 3 results from an estimated 3 matches for "applicationcontrollertest".

2008 May 07
2
Can I add a singleton action to @controller in a test?
...ionController::Routing::Routes.draw do |map| map.connect '':controller/foo'', :action => ''foo'' end get :foo end My log files show that no action responds to foo, so I think I''m not doing the routing properly. I''m trying this in ApplicationControllerTest, if that matters. Is anything obviously wrong here? Thanks for taking the time to read this, Brian -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk...
2008 Feb 08
0
Challenge! How can I write a test to test the methods in ApplicationController?
...nerate a test file for ApplicationController, so I have done that: require File.dirname(__FILE__) + ''/../test_helper'' require ''application.rb'' # Re-raise errors caught by the controller. class ApplicationController; def rescue_action(e) raise e end; end class ApplicationControllerTest < Test::Unit::TestCase fixtures :users def logger RAILS_DEFAULT_LOGGER end def setup @controller = ApplicationController.new @request = ActionController::TestRequest.new @response = ActionController::TestResponse.new end def test_admin # Don''t kno...
2006 Apr 16
1
How to use ZenTest?
OK, supposedly it has Rdoc documentation but I couldn''t find it (not helped by the fact that I''ve never used offline rdocs so I don''t really know where to look). So, does anybody know how to use ZenTest effectively with Rails? I read all I could find on the web but nothing really illuminated for me. I''m trying to get into Test Driven Development (I have already