| 122 | | klass.stub!(:find_by_title).and_return(@page) |
|---|
| 123 | | the_controller = klass.build(fake_request) |
|---|
| 124 | | the_controller.stub!(:params).and_return(opts.merge!(:controller => "#{klass.name.downcase}", :action => action.to_s)) |
|---|
| 125 | | |
|---|
| 126 | | yield the_controller if block_given? |
|---|
| 127 | | @controller = the_controller |
|---|
| 128 | | [the_controller, the_controller.dispatch(action.to_sym)] |
|---|
| 129 | | end |
|---|
| | 122 | @controller = klass.build(fake_request) |
|---|
| | 123 | @controller.stub!(:params).and_return(opts.merge!(:controller => klass.name.downcase, :action => action.to_s)) |
|---|
| | 124 | yield @controller if block_given? |
|---|
| | 125 | [@controller, @controller.dispatch(action.to_sym)] |
|---|
| | 126 | end |
|---|