toy/app_test.rb
Ryan Cavicchioni 33d0e40edc
Some checks failed
Gitea Actions Demo / test (push) Failing after 1m18s
Gitea Actions Demo / release-image (push) Has been skipped
Add a unit test
2024-07-06 17:42:01 -05:00

20 lines
312 B
Ruby

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, there!", last_response.body
end
end