Skip to content

Commit

Permalink
start testing
Browse files Browse the repository at this point in the history
  • Loading branch information
gtrias committed Sep 23, 2024
1 parent 4c1f970 commit 1fa6da0
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
1 change: 1 addition & 0 deletions examples/sinatra-pet-shelter/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ gem 'sinatra-contrib'
group :development, :test do
gem 'pry'
gem 'rspec'
gem 'rspec-html-matchers'
end
10 changes: 8 additions & 2 deletions examples/sinatra-pet-shelter/app_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@
require_relative 'app'

describe App do
it 'works' do
# ...
let(:app) { App.new }

context 'GET /' do
let(:response) { get '/members' }

it 'returns 200 OK' do
expect(response.status).to eq 200
end
end
end
3 changes: 3 additions & 0 deletions examples/sinatra-pet-shelter/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# frozen_string_literal: true

require 'rspec_html_matchers'

RSpec.configure do |config|
config.include RSpecHtmlMatchers
end

0 comments on commit 1fa6da0

Please sign in to comment.