Permalink
Browse files

Fixes the dispatch_to request helper to conver the action name to a s…

…tring.

This is what is expected by before and after filters using :only or :excludes.

Normal operation of the system uses strings for the action name.
  • Loading branch information...
1 parent ff17f77 commit ea57d20b0d1abd7cf2511d37f9b6cd17a2cda371 @hassox hassox committed Mar 11, 2008
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/merb-core/test/helpers/request_helper.rb
@@ -97,6 +97,7 @@ def fake_request(env = {}, opt = {})
#---
# @public
def dispatch_to(controller_klass, action, params = {}, env = {}, &blk)
+ action = action.to_s
request_body = { :post_body => env[:post_body], :req => env[:req] }
request = fake_request(env.merge(
:query_string => Merb::Request.params_to_query_string(params)), request_body)

0 comments on commit ea57d20

Please sign in to comment.