1
0
Fork 0
mirror of https://github.com/sinatra/sinatra synced 2023-03-27 23:18:01 -04:00
sinatra/test/sinatra_test.rb
Konstantin Haase 1d9034ff80 use new! rather than new for tests testing instance method
that way we ensure not to have any middleware in front of the Sinatra instance
2011-03-12 15:52:43 +01:00

17 lines
404 B
Ruby

require File.dirname(__FILE__) + '/helper'
class SinatraTest < Test::Unit::TestCase
it 'creates a new Sinatra::Base subclass on new' do
app =
Sinatra.new do
get '/' do
'Hello World'
end
end
assert_same Sinatra::Base, app.superclass
end
it "responds to #template_cache" do
assert_kind_of Tilt::Cache, Sinatra::Base.new!.template_cache
end
end