Files
game-data/spec/controllers/index_controller_spec.rb
Gregory Ballantine 40cfdcc2a3
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Changed naming from Routes to Controllers; fixed some Sinatra modular layout stuff; added RSpec for testing and some basic tests
2025-08-12 16:15:43 -04:00

24 lines
565 B
Ruby

# frozen_string_literal: true
require_relative '../spec_helper'
RSpec.describe(IndexController) do
# / route
describe 'Get /' do
it 'Dashboard returns 200.' do
get '/'
expect(last_response).to(be_ok)
end
it "Dashboard contains 'Game Data' on page (nav bar should be loaded)." do
get '/'
expect(last_response.body).to(include('Game Data'))
end
it "Dashboard contains 'Ruby version' on page (footer should be loaded)." do
get '/'
expect(last_response.body).to(include('Ruby version'))
end
end
end