Shared testing, reporting, and coverage tools for the Lesli Framework.
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
- 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
Quick Start
Add LesliTesting to the test group:
bundle add lesli_testing --group test
Require 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 gem
Load LesliTesting before the code under test when coverage is enabled. Engine suites that use the shared Rails test classes should run through bundle exec rails test or bundle exec rake app:test.
Rails engines should keep a complete generated dummy application and verify eager loading locally before pushing:
CI=true bundle exec rails test
LesliTesting does not provide an engine's runtime dependencies. Declare dependencies such as lesli explicitly in the engine gemspec and Gemfile so local and CI dependency resolution match.
Run the suite normally or enable coverage with COVERAGE:
bin/rails test
COVERAGE=true bin/rails test
bundle exec rake
COVERAGE=true bundle exec rake
Set QUIET=true to hide individual passing-test lines while retaining the summary and failure details.
Guides
- Installation and configuration
- Testing Rails applications
- Testing Rails engines
- Testing Ruby gems
- Reporter, coverage, fixtures, and test helpers
- Recommended project and gem structure
Development
Clone the repository and install its dependencies:
git clone https://github.com/LesliTech/LesliTesting.git
cd LesliTesting
bundle install
To 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 rake
Run the reporter demonstration failures explicitly with DEMO=true:
DEMO=true bundle exec ruby -Itest test/demo_test.rb
The demo command is expected to fail and is intended for visually checking failure formatting.
Documentation
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.
The Open-Source SaaS Development Framework for Ruby on Rails.
Last Update: 2026/10/10