Created
August 17, 2008 20:23
-
-
Save michaelklishin/5824 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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