--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Dispatches an action to the given class and using HTTP Basic Authentication This bypasses the router and is suitable for unit testing of controllers.
- !ruby/struct:SM::Flow::H 
  level: 4
  text: Parameters
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "controller_klass<Controller>:"
    body: The controller class object that the action should be dispatched to.
  - !ruby/struct:SM::Flow::LI 
    label: "action<Symbol>:"
    body: The action name, as a symbol.
  - !ruby/struct:SM::Flow::LI 
    label: "username<String>:"
    body: The username.
  - !ruby/struct:SM::Flow::LI 
    label: "password<String>:"
    body: The password.
  - !ruby/struct:SM::Flow::LI 
    label: "params<Hash>:"
    body: An optional hash that will end up as params in the controller instance.
  - !ruby/struct:SM::Flow::LI 
    label: "env<Hash>:"
    body: An optional hash that is passed to the fake request. Any request options should go here (see <tt>fake_request</tt>), including :req or :post_body for setting the request body itself.
  - !ruby/struct:SM::Flow::LI 
    label: "&blk:"
    body: The controller is yielded to the block provided for actions <b>prior</b> to the action being dispatched.
  type: :NOTE
- !ruby/struct:SM::Flow::H 
  level: 4
  text: Example
- !ruby/struct:SM::Flow::VERB 
  body: "  dispatch_with_basic_authentication_to(MyController, :create, 'Fred', 'secret', :name =&gt; 'Homer' ) do |controller|\n    controller.stub!(:current_user).and_return(@user)\n  end\n"
- !ruby/struct:SM::Flow::H 
  level: 4
  text: Notes
- !ruby/struct:SM::Flow::P 
  body: Does not use routes.
- !ruby/struct:SM::Flow::P 
  body: ":api: public @deprecated"
full_name: Merb::Test::RequestHelper#dispatch_with_basic_authentication_to
is_singleton: false
name: dispatch_with_basic_authentication_to
params: (controller_klass, action, username, password, params = {}, env = {}, &blk)
visibility: public
