Skip to content

Instantly share code, notes, and snippets.

@michaelklishin
Created August 17, 2008 20:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save michaelklishin/5824 to your computer and use it in GitHub Desktop.
Save michaelklishin/5824 to your computer and use it in GitHub Desktop.
require File.join(File.dirname(__FILE__), "..", "..", "spec_helper")
describe Merb::Rack::Application do
before(:each) do
@app = Merb::Rack::Application.new
end
it 'is callable' do
@app.should respond_to(:call)
end
it 'dispatches the request' do
env = Rack::MockRequest.env_for('/')
controller_env = mock('controller env')
controller_env.should_receive(:rack_response)
req = fake_request
Merb::Request.should_receive(:new).with(env).and_return(req)
Merb::Dispatcher.should_receive(:handle).and_return(controller_env)
@app.call(env)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment