stevenbeales/mental-test

View on GitHub
spec/app_spec.rb

Summary

Maintainability
A
0 mins
Test Coverage
# frozen_string_literal: true

require_relative '../app'

RSpec.describe App do
  subject { App.new }

  it { expect(subject).to be_a Sinatra::Wrapper }

  it 'should not allow accessing the home page' do
    get '/'
    expect(last_response).not_to be_ok
  end

  it 'should not throw an exception when posting a request to the home page' do
    expect { post '/' }.not_to raise_error
  end
end