toy/app_test.rb

20 lines
304 B
Ruby
Raw Normal View History

2024-07-06 21:06:53 +00:00
ENV['APP_ENV'] = 'test'
require './app'
require 'test/unit'
require 'rack/test'
class ToyTest < Test::Unit::TestCase
include Rack::Test::Methods
def app
Sinatra::Application
end
def test_root
get '/'
assert last_response.ok?
assert_equal 'hello', last_response.body
end
end