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

24 lines
431 B
Ruby
Raw Normal View History

2007-11-27 23:16:12 -05:00
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, '/')
2007-11-27 23:26:48 -05:00
result.should.not.be.nil
result.body.should.equal 'Hello'
2007-11-27 23:16:12 -05:00
2007-11-27 23:26:48 -05:00
end
2007-11-27 23:16:12 -05:00
end