Introduction
LesliTesting provides the shared test configuration used across the Lesli Framework.
It standardizes Minitest output, SimpleCov profiles, coverage reports, and fixture loading for Rails applications, engines, and Ruby gems.
Features
- Profiles for Rails applications, engines, and Ruby gems
- Human-friendly Minitest terminal reporting
- SimpleCov HTML, console, and Cobertura reports
- Configurable minimum coverage
- Shared Lesli fixture loading
- CI-aware test and coverage output
Installation
Add LesliTesting to the application:
bundle add lesli_testingUsage
Configure the test suite
Require LesliTesting near the beginning of test/test_helper.rb, then choose the matching project profile:
ENV["RAILS_ENV"] ||= "test"
require "lesli_testing"
LesliTesting.app("LesliBuilder")
# LesliTesting.engine("LesliShield")
# LesliTesting.gem("LesliDate")Coverage options
Pass configuration to the selected profile:
LesliTesting.engine(
"LesliShield",
coverage_missing_len: 30,
coverage_min_coverage: 80
)| Option | Type | Default | Description |
|---|---|---|---|
coverage_missing_len |
Integer | 25 |
Minimum width for missing-coverage output. |
coverage_min_coverage |
Integer | 90 |
Minimum expected coverage percentage. |
Run tests
bin/rails test
COVERAGE=true bin/rails test
COVERAGE=true CI=true bin/rails testSet QUIET=true to suppress the per-test lines printed by the custom reporter.
Development
Clone the repository and install its dependencies:
git clone https://github.com/LesliTech/LesliTesting.git
cd LesliTesting
bundle installTo use local source from a Lesli development workspace, reference it from the host application's Gemfile:
gem "lesli_testing", path: "gems/LesliTesting"Tests
Run the default test task from the LesliTesting directory:
bundle exec rakeDocumentation
Community
License
Copyright (c) 2026, Lesli Technologies, S. A.
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.
The complete license text is available in the license file.
