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.
- Coverage profiles for Rails applications, Rails engines, and Ruby gems
- A human-friendly Minitest reporter with per-test timing and failure details
- SimpleCov HTML, console, and Cobertura reports
- Configurable minimum coverage thresholds
- Shared base classes for integration, model, and view tests
- Automatic access to Lesli fixtures in Rails test cases
Add LesliTesting to the test group:
bundle add lesli_testing --group testRequire the gem from test/test_helper.rb and select exactly one profile for the project:
require "lesli_testing"
LesliTesting.app("LesliBuilder") # Rails application
# LesliTesting.engine("LesliShield") # Rails engine
# LesliTesting.gem("LesliDate") # Standalone Ruby gemLoad LesliTesting before the code under test when coverage is enabled. Rails projects should load rails/test_help before configuration when they use the shared Rails test classes.
Run the suite normally or enable coverage with COVERAGE:
bin/rails test
COVERAGE=true bin/rails test
bundle exec rake
COVERAGE=true bundle exec rakeSet QUIET=true to hide individual passing-test lines while retaining the summary and failure details.
- Installation and configuration
- Testing Rails applications
- Testing Rails engines
- Testing Ruby gems
- Reporter, coverage, fixtures, and test helpers
- Recommended project and gem structure
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"Run the default test task from the LesliTesting directory:
bundle exec rakeRun the reporter demonstration failures explicitly with DEMO=true:
DEMO=true bundle exec ruby -Itest test/demo_test.rbThe demo command is expected to fail and is intended for visually checking failure formatting.
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.
