Merbies:

I have clawed my way to the next line in my spec:

require File.join(File.dirname(__FILE__), "..", 'spec_helper.rb')
require File.dirname(__FILE__) + '/../mock_request'

describe Grepper, "index action" do
  before :each do
    @in = Merb::MockRequest.new # ?
    @res = StringIO.new  # ?
    @controller = Merb::Controller.new(:controller => 'Grepper',
                                           :action => 'index')
  end

  it 'should do something' do
 #   @controller.dispatch(:index)
  end
end

Despite the merb-gen (and 
http://merb.lighthouseapp.com/projects/7435-merb-more/tickets/95 ), I seem 
to have a @controller that does not croak. But does it control? And how do I 
invoke its action, 'index'?

The classic code uses the line I commented out, with dispatch(), and 
naturally this doesn't work.

Does anyone have a working example of a Merb 0.9 site with intact Controller 
specs in it?

-- 
  Phlip 



_______________________________________________
Merb-devel mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/merb-devel

Reply via email to