1
0
Fork 0
mirror of https://github.com/sinatra/sinatra synced 2023-03-27 23:18:01 -04:00
sinatra/test/events_test.rb
2007-11-27 20:16:12 -08:00

21 lines
388 B
Ruby

require File.dirname(__FILE__) + '/../lib/sinatra'
require 'rubygems'
require 'test/spec'
context "Simple Events" do
specify "return what's at the end" do
application = Sinatra::Application.new
route = application.define_event(:get, '/') do
'Hello'
end
result = application.lookup(:get, '/')
result.should.equal route
end
end