Add a persisted test suite
CI / check (push) Successful in 1m56s
CI / deploy (push) Successful in 2m56s

`bundle exec rake test` (minitest, a default gem but pinned in
Gemfile for reproducibility) now covers what ad-hoc scripts kept
re-verifying by hand during development: Gpx/Fit/TrackStats parsing,
GpxStore/LiveTrackStore file/TTL logic, LiveTrackClient's payload
parsing, and app.rb's routes end to end via Rack::MockRequest.

MAPTOOL_DATA_DIR (new, app.rb) lets the suite point GPX_STORE/
LIVETRACK_STORE at a throwaway directory instead of real data/ —
without it every run would leave uploaded test files behind. Each
lib file's old `if __FILE__ == $0` self-check is now redundant with
real tests covering the same ground, so removed rather than kept as
a second copy of the same assertions. Wired into ci.yml so it isn't
just a local convenience.
This commit is contained in:
randy committed 2026-09-07 12:46:35 +02:00
1 parent a3c31ace06
commit cd4eef342b
19 files changed
+706 -174

No files matched your search

+5
View File
@@ -10,3 +10,8 @@ gem "rubyzip", "~> 2.4"
group :development do
gem "rerun"
end
group :test do
gem "minitest", "~> 6.0"
gem "rake", "~> 13.0"
end