lesli_testing 1.3.0 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bdacbd0fd03af65afdbaed58961bd85ecf8d1a1868af0f4aeddf9867245767c0
4
- data.tar.gz: 789586b828f9bf72666eba3a017e58213d17ad1cca1ee398e109a3dcbd9db28f
3
+ metadata.gz: 9e25e9ae176117279c4cf416cbc69557158d90aee0a0cda0b59bcc36301171f7
4
+ data.tar.gz: 44bac7ca08dabc31650468010baac79760e8781d6f4b400d6d5eeb6dcd3b6dc8
5
5
  SHA512:
6
- metadata.gz: a0a8abf6b75c318a8c8246c9b304926115d1105b5f667bcd33b245905501363dcb1fb042bb09f0240c17a5a738cd69032214cba941ac32f3a9e1dc589ec62df4
7
- data.tar.gz: b0e95f307cf5422ec7425aaf0466da0024dcdafd743f371b8c26d9a9bb13751a161366f5696b284f0c7208842919564f2214a88e996b06a1206cfadc4387b55d
6
+ metadata.gz: e608973abe0d050fa4adcc284d4f1ddb3637408142acb241e3a76be931888e77b15e7e67751511eaf818d44f519674a55c4f4b9c66c68656e7dc49185bbfc339
7
+ data.tar.gz: ed2da15d9d78d227bf88a0088ce2d9c65eebfbf84d2cb40476783c03657d80f45f69e899e2f1ac7f448999946bf14466bff369be4ba3d7309d9ed937e56150fb
@@ -156,7 +156,6 @@ module LesliTesting
156
156
  if failure.is_a?(Minitest::Assertion)
157
157
  result.failure.message.to_s.lines.each do |message|
158
158
  puts(parse_minitest_assertion_messages(message))
159
- #puts(parse_minitest_assertion_messages2(message))
160
159
  end
161
160
  end
162
161
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module LesliTesting
4
- VERSION = "1.3.0"
5
- BUILD = "1775525290"
4
+ VERSION = "1.4.0"
5
+ BUILD = "1790482019"
6
6
  end
data/lib/lesli_testing.rb CHANGED
@@ -109,7 +109,7 @@ module LesliTesting
109
109
  def configure_gems
110
110
  return if @tools_loaded
111
111
 
112
- #require "minitest"
112
+ require "minitest"
113
113
 
114
114
  # Load minitest plugin
115
115
  require "minitest/lesli_testing_plugin"
data/readme.md CHANGED
@@ -1,111 +1,160 @@
1
- <div align="center" class="documentation-header">
2
- <img width="100" alt="LesliTesting logo" src="./docs/images/testing-logo.svg" />
3
- <h3 align="center">Shared testing and coverage configuration for the Lesli Platform.</h3>
1
+ <div align="center">
2
+ <h1 align="center">
3
+ <img width="100" alt="LesliTesting" src="./docs/images/testing-logo.svg" />
4
+ </h1>
5
+ <h3 align="center">Shared testing, reporting, and coverage tools for the Lesli Framework.</h3>
4
6
  </div>
5
7
 
6
8
  <br />
7
- <hr/>
8
- <br />
9
-
10
9
 
11
- ### Quick start
10
+ <div align="center">
11
+ <a target="_blank" href="https://github.com/LesliTech/LesliTesting/actions/workflows/main.yml">
12
+ <img alt="LesliTesting test status" src="https://img.shields.io/github/actions/workflow/status/LesliTech/LesliTesting/main.yml?branch=main&style=for-the-badge&logo=github&label=tests">
13
+ </a>
14
+ <a target="_blank" href="https://rubygems.org/gems/lesli_testing">
15
+ <img alt="Gem Version" src="https://img.shields.io/gem/v/lesli_testing?style=for-the-badge&logo=ruby">
16
+ </a>
17
+ <a target="_blank" href="https://codecov.io/github/LesliTech/LesliTesting">
18
+ <img alt="Codecov" src="https://img.shields.io/codecov/c/github/LesliTech/LesliTesting?style=for-the-badge&logo=codecov">
19
+ </a>
20
+ <a target="_blank" href="https://sonarcloud.io/project/overview?id=LesliTech_LesliTesting">
21
+ <img alt="Sonar Quality Gate" src="https://img.shields.io/sonar/quality_gate/LesliTech_LesliTesting?server=https%3A%2F%2Fsonarcloud.io&style=for-the-badge&logo=sonarqubecloud&label=Quality">
22
+ </a>
23
+ </div>
12
24
 
13
25
  <br />
14
26
 
27
+ <div align="center">
28
+ <img
29
+ style="width:100%;max-width:800px;border-radius:6px;"
30
+ alt="LesliTesting terminal test report"
31
+ src="./docs/images/screenshot.png" />
32
+ </div>
15
33
 
16
- **Install LesliTesting gem**
34
+ <br />
17
35
 
18
- ```shell
19
- bundle add lesli_testing
20
- ```
36
+ ---
21
37
 
22
38
  <br />
23
39
 
24
- **Include LesliTesting in your test_helper.rb file**
40
+ ## Introduction
25
41
 
26
- ```ruby
27
- ENV["RAILS_ENV"] ||= "test"
42
+ LesliTesting provides the shared test configuration used across the [Lesli Framework](https://github.com/LesliTech/Lesli).
28
43
 
44
+ It standardizes Minitest output, SimpleCov profiles, coverage reports, and fixture loading for Rails applications, engines, and Ruby gems.
29
45
 
30
- # Load LesliTesting tools
31
- require "lesli_testing"
46
+ <br />
32
47
 
48
+ ## Features
33
49
 
34
- # Configure leslitesting tools for a rails engine
35
- LesliTesting.engine("LesliShield")
50
+ - Coverage profiles for Rails applications, Rails engines, and Ruby gems
51
+ - A human-friendly Minitest reporter with per-test timing and failure details
52
+ - SimpleCov HTML, console, and Cobertura reports
53
+ - Configurable minimum coverage thresholds
54
+ - Shared base classes for integration, model, and view tests
55
+ - Automatic access to Lesli fixtures in Rails test cases
36
56
 
57
+ <br />
37
58
 
38
- # Configure lesli testing tools for a rails app
39
- LesliTesting.app("LesliBuilder")
59
+ ## Quick Start
40
60
 
61
+ Add LesliTesting to the test group:
41
62
 
42
- # # Configure leslitesting tools for a ruby gem
43
- LesliTesting.gem("LesliDate")
63
+ ```shell
64
+ bundle add lesli_testing --group test
44
65
  ```
45
66
 
46
- <br />
67
+ Require the gem from `test/test_helper.rb` and select exactly one profile for the project:
47
68
 
48
- **Run your tests D:**
69
+ ```ruby
70
+ require "lesli_testing"
49
71
 
50
- ```shell
51
- rails test
72
+ LesliTesting.app("LesliBuilder") # Rails application
73
+ # LesliTesting.engine("LesliShield") # Rails engine
74
+ # LesliTesting.gem("LesliDate") # Standalone Ruby gem
75
+ ```
52
76
 
53
- # or
77
+ 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.
54
78
 
55
- COVERAGE=true rails test
79
+ Run the suite normally or enable coverage with `COVERAGE`:
56
80
 
57
- # or run like github actions
81
+ ```shell
82
+ bin/rails test
83
+ COVERAGE=true bin/rails test
58
84
 
59
- COVERAGE=true CI=true rails test
85
+ bundle exec rake
86
+ COVERAGE=true bundle exec rake
60
87
  ```
61
88
 
89
+ Set `QUIET=true` to hide individual passing-test lines while retaining the summary and failure details.
90
+
62
91
  <br />
63
92
 
64
- **Result :D**
93
+ ## Guides
65
94
 
66
- <div align="center">
67
- <img
68
- style="width:100%;max-width:800px;border-radius:6px;"
69
- alt="LesliTesting screenshot" src="./docs/images/screenshot.png" />
70
- </div>
95
+ - [Installation and configuration](./docs/installation.md)
96
+ - [Testing Rails applications](./docs/applications.md)
97
+ - [Testing Rails engines](./docs/engines.md)
98
+ - [Testing Ruby gems](./docs/gems.md)
99
+ - [Reporter, coverage, fixtures, and test helpers](./docs/tools.md)
100
+ - [Recommended project and gem structure](./docs/structure.md)
71
101
 
72
102
  <br />
73
103
 
74
- ### Options
104
+ ## Development
75
105
 
76
- The following options can be used to customize coverage behavior in `LesliTesting`.
106
+ Clone the repository and install its dependencies:
77
107
 
78
- | Option | Type | Default | Description |
79
- | ----------------------- | ------- | ------: | ------------------------------------------ |
80
- | `coverage_missing_len` | Integer | `25` | Minimum width for missing coverage output. |
81
- | `coverage_min_coverage` | Integer | `40` | Minimum expected coverage percentage. |
108
+ ```shell
109
+ git clone https://github.com/LesliTech/LesliTesting.git
110
+ cd LesliTesting
111
+ bundle install
112
+ ```
82
113
 
83
- **Example:**
114
+ To use local source from a Lesli development workspace, reference it from the host application's `Gemfile`:
84
115
 
85
116
  ```ruby
86
- LesliTesting.configure(LesliShield, {
87
- coverage_missing_len: 30,
88
- coverage_min_coverage: 80
89
- })
117
+ gem "lesli_testing", path: "gems/LesliTesting"
118
+ ```
119
+
120
+ ### Tests
121
+
122
+ Run the default test task from the LesliTesting directory:
123
+
124
+ ```shell
125
+ bundle exec rake
126
+ ```
127
+
128
+ Run the reporter demonstration failures explicitly with `DEMO=true`:
129
+
130
+ ```shell
131
+ DEMO=true bundle exec ruby -Itest test/demo_test.rb
90
132
  ```
91
133
 
134
+ The demo command is expected to fail and is intended for visually checking failure formatting.
135
+
92
136
  <br />
93
137
 
94
- ### Documentation
95
- * [website](https://www.lesli.dev/)
96
- * [documentation](https://www.lesli.dev/gems/testing/)
138
+ ## Documentation
139
+
140
+ - [Lesli website](https://www.lesli.dev/)
141
+ - [Documentation](https://www.lesli.dev/gems/testing/)
142
+ - [Release notes](https://github.com/LesliTech/LesliTesting/releases)
143
+ - [Issue tracker](https://github.com/LesliTech/LesliTesting/issues)
144
+ - [Source code](https://github.com/LesliTech/LesliTesting)
97
145
 
146
+ <br />
98
147
 
99
- ### Connect with Lesli
148
+ ## Community
100
149
 
101
- * [X: @LesliTech](https://x.com/LesliTech)
102
- * [Email: hello@lesli.tech](hello@lesli.tech)
103
- * [Website: https://www.lesli.tech](https://www.lesli.tech)
150
+ - [X: @LesliTech](https://x.com/LesliTech)
151
+ - [hello@lesli.tech](mailto:hello@lesli.tech)
152
+ - [https://www.lesli.tech](https://www.lesli.tech)
104
153
 
105
154
  <br />
106
155
 
107
- ### License
108
- -------
156
+ ## License
157
+
109
158
  Copyright (c) 2026, Lesli Technologies, S. A.
110
159
 
111
160
  This program is free software: you can redistribute it and/or modify
@@ -119,17 +168,16 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
119
168
  GNU General Public License for more details.
120
169
 
121
170
  You should have received a copy of the GNU General Public License
122
- along with this program. If not, see http://www.gnu.org/licenses/.
171
+ along with this program. If not, see [https://www.gnu.org/licenses/](https://www.gnu.org/licenses/).
172
+
173
+ The complete license text is available in the [license file](./license).
174
+
175
+ ---
123
176
 
124
- <hr />
125
177
  <br />
126
178
  <br />
127
179
 
128
- <div align="center" class="has-text-centered">
129
- <img width="80" alt="Lesli logo" src="https://cdn.lesli.tech/lesli/brand/app-icon.svg" />
130
- <h4 align="center" class="mt-0">
131
- The Open-Source SaaS Development Framework for Ruby on Rails.
132
- </h4>
180
+ <div align="center">
181
+ <img width="80" alt="Lesli icon" src="https://cdn.lesli.tech/lesli/brand/app-icon.svg" />
182
+ <h3 align="center">The Open-Source SaaS Development Framework for Ruby on Rails.</h3>
133
183
  </div>
134
-
135
- <br />
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lesli_testing
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - The Lesli Development Team
@@ -10,106 +10,92 @@ cert_chain: []
10
10
  date: 1980-01-02 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
- name: minitest
14
- requirement: !ruby/object:Gem::Requirement
15
- requirements:
16
- - - "~>"
17
- - !ruby/object:Gem::Version
18
- version: 6.0.0
19
- type: :runtime
20
- prerelease: false
21
- version_requirements: !ruby/object:Gem::Requirement
22
- requirements:
23
- - - "~>"
24
- - !ruby/object:Gem::Version
25
- version: 6.0.0
26
- - !ruby/object:Gem::Dependency
27
- name: simplecov
13
+ name: termline
28
14
  requirement: !ruby/object:Gem::Requirement
29
15
  requirements:
30
16
  - - "~>"
31
17
  - !ruby/object:Gem::Version
32
- version: 0.22.0
18
+ version: 1.1.0
33
19
  type: :runtime
34
20
  prerelease: false
35
21
  version_requirements: !ruby/object:Gem::Requirement
36
22
  requirements:
37
23
  - - "~>"
38
24
  - !ruby/object:Gem::Version
39
- version: 0.22.0
25
+ version: 1.1.0
40
26
  - !ruby/object:Gem::Dependency
41
- name: simplecov-console
27
+ name: minitest
42
28
  requirement: !ruby/object:Gem::Requirement
43
29
  requirements:
44
30
  - - "~>"
45
31
  - !ruby/object:Gem::Version
46
- version: 0.9.0
32
+ version: 6.0.0
47
33
  type: :runtime
48
34
  prerelease: false
49
35
  version_requirements: !ruby/object:Gem::Requirement
50
36
  requirements:
51
37
  - - "~>"
52
38
  - !ruby/object:Gem::Version
53
- version: 0.9.0
39
+ version: 6.0.0
54
40
  - !ruby/object:Gem::Dependency
55
- name: simplecov-cobertura
41
+ name: simplecov
56
42
  requirement: !ruby/object:Gem::Requirement
57
43
  requirements:
58
44
  - - "~>"
59
45
  - !ruby/object:Gem::Version
60
- version: 3.1.0
46
+ version: 0.22.0
61
47
  type: :runtime
62
48
  prerelease: false
63
49
  version_requirements: !ruby/object:Gem::Requirement
64
50
  requirements:
65
51
  - - "~>"
66
52
  - !ruby/object:Gem::Version
67
- version: 3.1.0
53
+ version: 0.22.0
68
54
  - !ruby/object:Gem::Dependency
69
- name: brakeman
55
+ name: simplecov-html
70
56
  requirement: !ruby/object:Gem::Requirement
71
57
  requirements:
72
58
  - - "~>"
73
59
  - !ruby/object:Gem::Version
74
- version: 8.0.0
60
+ version: 0.13.2
75
61
  type: :runtime
76
62
  prerelease: false
77
63
  version_requirements: !ruby/object:Gem::Requirement
78
64
  requirements:
79
65
  - - "~>"
80
66
  - !ruby/object:Gem::Version
81
- version: 8.0.0
67
+ version: 0.13.2
82
68
  - !ruby/object:Gem::Dependency
83
- name: letter_opener
69
+ name: simplecov-console
84
70
  requirement: !ruby/object:Gem::Requirement
85
71
  requirements:
86
72
  - - "~>"
87
73
  - !ruby/object:Gem::Version
88
- version: 1.10.0
74
+ version: 0.9.0
89
75
  type: :runtime
90
76
  prerelease: false
91
77
  version_requirements: !ruby/object:Gem::Requirement
92
78
  requirements:
93
79
  - - "~>"
94
80
  - !ruby/object:Gem::Version
95
- version: 1.10.0
81
+ version: 0.9.0
96
82
  - !ruby/object:Gem::Dependency
97
- name: termline
83
+ name: simplecov-cobertura
98
84
  requirement: !ruby/object:Gem::Requirement
99
85
  requirements:
100
86
  - - "~>"
101
87
  - !ruby/object:Gem::Version
102
- version: 1.1.0
88
+ version: 3.1.0
103
89
  type: :runtime
104
90
  prerelease: false
105
91
  version_requirements: !ruby/object:Gem::Requirement
106
92
  requirements:
107
93
  - - "~>"
108
94
  - !ruby/object:Gem::Version
109
- version: 1.1.0
95
+ version: 3.1.0
110
96
  description: "Core testing utilities for the Lesli Platform, providing standardized
111
97
  Minitest configuration, \ncoverage setup, and shared testing conventions across
112
- engines and applications.\n"
98
+ applications, engines and gems.\n"
113
99
  email:
114
100
  - hello@lesli.tech
115
101
  executables: []