Displaying 1 result from an estimated 1 matches for "test_my_filter".
2008 May 07
2
Can I add a singleton action to @controller in a test?
All,
I want to create a mock action to test a filter in a functional test,
e.g.:
# Simplified example
def test_my_filter
    # Singleton action
    def @controller.foo
      assert # something
    end
    ActionController::Routing::Routes.draw do |map|
      map.connect '':controller/foo'', :action => ''foo''
    end
    get :foo
end
My log files show that no action responds to f...