lesli_testing 1.4.0 → 1.4.1
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 +4 -4
- data/lib/lesli_testing/engine.rb +5 -6
- data/lib/lesli_testing/version.rb +2 -2
- data/lib/lesli_testing.rb +7 -0
- data/readme.md +15 -7
- metadata +10 -7
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 88698ef1e9d9deca5342518ce5b98a148f90fe3188598e8207555a379563ef36
|
|
4
|
+
data.tar.gz: 839d2855e41e179d6c50d5c62244c3edce13ebad39bd60039dae25886367d638
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d5d712746d0f43f32991cc0823af12b1418f29c943f8eeddb1a97fc8f712d570b083e7a8b32617494a1c13617d29286e35fafab7dba7ea1cd5e46604cba52853
|
|
7
|
+
data.tar.gz: 1d60e86d118f5f8859cb5360d3fa01d5c3a35c0e47a087bcd461f224332c77a634322244aad8c08fbf567ce35ab960dcdd6e024bcbb082d584a8996bf9441dc7
|
data/lib/lesli_testing/engine.rb
CHANGED
|
@@ -37,8 +37,7 @@ module LesliTesting
|
|
|
37
37
|
# Only run this if we are in the test environment
|
|
38
38
|
unless Rails.env.production?
|
|
39
39
|
|
|
40
|
-
#
|
|
41
|
-
# You can add more gems to this list as your ecosystem grows
|
|
40
|
+
# Lesli provides the shared schema required by every engine.
|
|
42
41
|
dependencies = ["Lesli"]
|
|
43
42
|
|
|
44
43
|
dependencies.each do |gem_name|
|
|
@@ -51,16 +50,16 @@ module LesliTesting
|
|
|
51
50
|
|
|
52
51
|
# Append to the main app's migration paths if the directory exists
|
|
53
52
|
if Dir.exist?(migration_path)
|
|
54
|
-
app.config.paths["db/migrate"]
|
|
53
|
+
registered_paths = app.config.paths["db/migrate"].expanded
|
|
54
|
+
unless registered_paths.include?(migration_path)
|
|
55
|
+
app.config.paths["db/migrate"] << migration_path
|
|
56
|
+
end
|
|
55
57
|
end
|
|
56
58
|
end
|
|
57
59
|
rescue StandardError => e
|
|
58
60
|
puts "LesliTesting: Could not load migrations for #{gem_name}: #{e.message}"
|
|
59
61
|
end
|
|
60
62
|
end
|
|
61
|
-
|
|
62
|
-
# 2. Clean up duplicates
|
|
63
|
-
app.config.paths["db/migrate"].uniq!
|
|
64
63
|
end
|
|
65
64
|
end
|
|
66
65
|
end
|
data/lib/lesli_testing.rb
CHANGED
|
@@ -35,6 +35,13 @@ Building a better future, one line of code at a time.
|
|
|
35
35
|
|
|
36
36
|
require_relative "lesli_testing/version"
|
|
37
37
|
|
|
38
|
+
begin
|
|
39
|
+
require "rails/engine"
|
|
40
|
+
require_relative "lesli_testing/engine"
|
|
41
|
+
rescue LoadError
|
|
42
|
+
# Rails is optional when LesliTesting is used by a standalone Ruby gem.
|
|
43
|
+
end
|
|
44
|
+
|
|
38
45
|
|
|
39
46
|
module LesliTesting
|
|
40
47
|
class Error < StandardError; end
|
data/readme.md
CHANGED
|
@@ -74,7 +74,15 @@ LesliTesting.app("LesliBuilder") # Rails application
|
|
|
74
74
|
# LesliTesting.gem("LesliDate") # Standalone Ruby gem
|
|
75
75
|
```
|
|
76
76
|
|
|
77
|
-
Load LesliTesting before the code under test when coverage is enabled. Rails
|
|
77
|
+
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`.
|
|
78
|
+
|
|
79
|
+
Rails engines should keep a complete generated dummy application and verify eager loading locally before pushing:
|
|
80
|
+
|
|
81
|
+
```shell
|
|
82
|
+
CI=true bundle exec rails test
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
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.
|
|
78
86
|
|
|
79
87
|
Run the suite normally or enable coverage with `COVERAGE`:
|
|
80
88
|
|
|
@@ -92,12 +100,12 @@ Set `QUIET=true` to hide individual passing-test lines while retaining the summa
|
|
|
92
100
|
|
|
93
101
|
## Guides
|
|
94
102
|
|
|
95
|
-
- [Installation and configuration](
|
|
96
|
-
- [Testing Rails applications](
|
|
97
|
-
- [Testing Rails engines](
|
|
98
|
-
- [Testing Ruby gems](
|
|
99
|
-
- [Reporter, coverage, fixtures, and test helpers](
|
|
100
|
-
- [Recommended project and gem structure](
|
|
103
|
+
- [Installation and configuration](https://www.lesli.dev/gems/testing/about/installation)
|
|
104
|
+
- [Testing Rails applications](https://www.lesli.dev/gems/testing/testing/applications)
|
|
105
|
+
- [Testing Rails engines](https://www.lesli.dev/gems/testing/testing/engines)
|
|
106
|
+
- [Testing Ruby gems](https://www.lesli.dev/gems/testing/testing/gems)
|
|
107
|
+
- [Reporter, coverage, fixtures, and test helpers](https://www.lesli.dev/gems/testing/about/tools)
|
|
108
|
+
- [Recommended project and gem structure](https://www.lesli.dev/gems/testing/about/structure)
|
|
101
109
|
|
|
102
110
|
<br />
|
|
103
111
|
|
metadata
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: lesli_testing
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.4.
|
|
4
|
+
version: 1.4.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- The Lesli Development Team
|
|
8
|
+
autorequire:
|
|
8
9
|
bindir: exe
|
|
9
10
|
cert_chain: []
|
|
10
|
-
date:
|
|
11
|
+
date: 2026-10-13 00:00:00.000000000 Z
|
|
11
12
|
dependencies:
|
|
12
13
|
- !ruby/object:Gem::Dependency
|
|
13
14
|
name: termline
|
|
@@ -43,14 +44,14 @@ dependencies:
|
|
|
43
44
|
requirements:
|
|
44
45
|
- - "~>"
|
|
45
46
|
- !ruby/object:Gem::Version
|
|
46
|
-
version:
|
|
47
|
+
version: 1.3.2
|
|
47
48
|
type: :runtime
|
|
48
49
|
prerelease: false
|
|
49
50
|
version_requirements: !ruby/object:Gem::Requirement
|
|
50
51
|
requirements:
|
|
51
52
|
- - "~>"
|
|
52
53
|
- !ruby/object:Gem::Version
|
|
53
|
-
version:
|
|
54
|
+
version: 1.3.2
|
|
54
55
|
- !ruby/object:Gem::Dependency
|
|
55
56
|
name: simplecov-html
|
|
56
57
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -85,14 +86,14 @@ dependencies:
|
|
|
85
86
|
requirements:
|
|
86
87
|
- - "~>"
|
|
87
88
|
- !ruby/object:Gem::Version
|
|
88
|
-
version:
|
|
89
|
+
version: 4.0.0
|
|
89
90
|
type: :runtime
|
|
90
91
|
prerelease: false
|
|
91
92
|
version_requirements: !ruby/object:Gem::Requirement
|
|
92
93
|
requirements:
|
|
93
94
|
- - "~>"
|
|
94
95
|
- !ruby/object:Gem::Version
|
|
95
|
-
version:
|
|
96
|
+
version: 4.0.0
|
|
96
97
|
description: "Core testing utilities for the Lesli Platform, providing standardized
|
|
97
98
|
Minitest configuration, \ncoverage setup, and shared testing conventions across
|
|
98
99
|
applications, engines and gems.\n"
|
|
@@ -123,6 +124,7 @@ metadata:
|
|
|
123
124
|
source_code_uri: https://github.com/LesliTech/LesliTesting
|
|
124
125
|
bug_tracker_uri: https://github.com/LesliTech/LesliTesting/issues
|
|
125
126
|
documentation_uri: https://www.lesli.dev/gems/testing/
|
|
127
|
+
post_install_message:
|
|
126
128
|
rdoc_options: []
|
|
127
129
|
require_paths:
|
|
128
130
|
- lib
|
|
@@ -137,7 +139,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
137
139
|
- !ruby/object:Gem::Version
|
|
138
140
|
version: '0'
|
|
139
141
|
requirements: []
|
|
140
|
-
rubygems_version: 3.
|
|
142
|
+
rubygems_version: 3.5.16
|
|
143
|
+
signing_key:
|
|
141
144
|
specification_version: 4
|
|
142
145
|
summary: Shared testing and coverage configuration for the Lesli Platform.
|
|
143
146
|
test_files: []
|