kipunji/spec/app_spec.rb
2024-07-07 20:14:02 -05:00

22 lines
349 B
Ruby

ENV["APP_ENV"] = "test"
require "./app"
require "rspec"
require "rack/test"
describe "Toy App" do
include Rack::Test::Methods
def app
Sinatra::Application
end
context "test /" do
it "test root route" do
get "/"
expect(last_response).to be_ok
expect(last_response.body).to eq("hello there!\n")
end
end
end