Skip to content

Repository files navigation

LesliTesting

Shared testing, reporting, and coverage tools for the Lesli Framework.



LesliTesting terminal test report



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. 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 rake

Set QUIET=true to hide individual passing-test lines while retaining the summary and failure details.


Guides


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.




Lesli icon

The Open-Source SaaS Development Framework for Ruby on Rails.

About

Shared testing and coverage configuration for the Lesli Platform.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages