-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
28 changed files
with
259 additions
and
210 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,4 +36,4 @@ jobs: | |
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "Samuel Williams" | ||
${{matrix.env}} bundle exec rspec | ||
bundle exec bake test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/usr/bin/env rackup | ||
# frozen_string_literal: true | ||
|
||
require_relative 'config/environment' | ||
|
||
require 'financier/middleware' | ||
|
||
Financier::Middleware.call(self, utopia: UTOPIA) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'bundler/setup' | ||
Bundler.setup | ||
|
||
require 'utopia/setup' | ||
UTOPIA ||= Utopia.setup | ||
|
||
require_relative '../db/environment' | ||
|
||
require 'financier' | ||
require 'json' | ||
|
||
require 'time/zone' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
require 'covered/sus' | ||
include Covered::Sus | ||
|
||
require_relative 'environment' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# frozen_string_literal: true | ||
|
||
# Released under the MIT License. | ||
# Copyright, 2016-2023, by Samuel Williams. | ||
|
||
require 'rack/test' | ||
require 'sus/fixtures/async/http' | ||
require 'protocol/rack' | ||
|
||
AWebsite = Sus::Shared("a website") do | ||
include Rack::Test::Methods | ||
|
||
let(:rackup_path) {File.expand_path('../config.ru', __dir__)} | ||
let(:rackup_directory) {File.dirname(rackup_path)} | ||
|
||
let(:app) {Rack::Builder.parse_file(rackup_path)} | ||
end | ||
|
||
AValidPage = Sus::Shared("a valid page") do |path| | ||
it "can access #{path}" do | ||
get path | ||
|
||
while last_response.redirect? | ||
follow_redirect! | ||
end | ||
|
||
expect(last_response.status).to be == 200 | ||
end | ||
end | ||
|
||
AServer = Sus::Shared("a server") do | ||
include Sus::Fixtures::Async::HTTP::ServerContext | ||
|
||
let(:rackup_path) {File.expand_path('../config.ru', __dir__)} | ||
let(:rackup_directory) {File.dirname(rackup_path)} | ||
|
||
let(:rack_app) {Rack::Builder.parse_file(rackup_path)} | ||
let(:app) {Protocol::Rack::Adapter.new(rack_app)} | ||
end |
Oops, something went wrong.