lesli_testing 1.0.0 → 1.1.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 +4 -4
- data/lib/lesli_testing/coverage.rb +8 -7
- data/lib/lesli_testing/loader.rb +12 -7
- data/lib/lesli_testing/version.rb +2 -2
- metadata +1 -15
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 64fa5a23a5244e08277309981dfbf032758b801d3c29e6132d009662e0050a06
|
|
4
|
+
data.tar.gz: '08f3fd4da24135ab61e84bf3c6d0ae6ef46a081e7159db1351f5a24df31de2b0'
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e82d47aa6744d3a4759e759d6037d86024d67bb2f48732d175b28071305e7f738c6da04d4dd93096fc526569f8a77e7e038d1f806f40b289a59214a9c374ebee
|
|
7
|
+
data.tar.gz: 460536da88ff35bb2be4c5a252824aab1327ad1c23a6de2df2ce731dd9c3d64d199aca943e06b0fba91cc77f4a31c079f074e7b70d18cbce4d96903507c0d2e3
|
|
@@ -44,29 +44,30 @@ module LesliTesting
|
|
|
44
44
|
# Define the limit to allow missing tested code
|
|
45
45
|
SimpleCov::Formatter::Console.missing_len = 10
|
|
46
46
|
|
|
47
|
-
SimpleCov.start do
|
|
48
|
-
|
|
47
|
+
SimpleCov.start "rails" do
|
|
48
|
+
command_name engine_name
|
|
49
49
|
|
|
50
50
|
# Standard filters for all Lesli engines
|
|
51
51
|
add_filter [
|
|
52
52
|
"/app/assets",
|
|
53
53
|
"/app/jobs",
|
|
54
54
|
"/config",
|
|
55
|
+
"/docs",
|
|
55
56
|
"/db",
|
|
56
57
|
"/lib/test",
|
|
57
58
|
"/test",
|
|
59
|
+
"/test/dummy/",
|
|
58
60
|
"/vendor"
|
|
59
61
|
]
|
|
60
62
|
|
|
61
63
|
# Add your groups
|
|
62
64
|
add_group "Models", "app/models"
|
|
63
|
-
add_group "
|
|
64
|
-
add_group "Validators", "app/validators"
|
|
65
|
+
add_group "Services", "app/services"
|
|
65
66
|
add_group "Controllers", "app/controllers"
|
|
66
|
-
end
|
|
67
67
|
|
|
68
|
-
|
|
69
|
-
|
|
68
|
+
# Minimum expected coverage percentage
|
|
69
|
+
minimum_coverage min_coverage
|
|
70
|
+
end
|
|
70
71
|
end
|
|
71
72
|
end
|
|
72
73
|
end
|
data/lib/lesli_testing/loader.rb
CHANGED
|
@@ -51,17 +51,21 @@ module LesliTesting
|
|
|
51
51
|
|
|
52
52
|
class << self
|
|
53
53
|
|
|
54
|
-
def
|
|
54
|
+
def start_coverage!(engine_module = nil, options = {})
|
|
55
|
+
return if defined?(SimpleCov) && SimpleCov.running
|
|
55
56
|
|
|
56
57
|
name = engine_module ? engine_module.name : "RailsApp"
|
|
57
58
|
|
|
58
|
-
#
|
|
59
|
-
show_welcome_message
|
|
60
|
-
|
|
61
|
-
# 2. Start Coverage
|
|
59
|
+
# Start Coverage
|
|
62
60
|
LesliTesting::Coverage.start(name, options[:min_coverage] || 40)
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
def configure_tests!(engine_module = nil)
|
|
64
|
+
|
|
65
|
+
# Notify
|
|
66
|
+
show_welcome_message
|
|
63
67
|
|
|
64
|
-
#
|
|
68
|
+
# Apply Minitest/Reporters/Paths
|
|
65
69
|
LesliTesting::Config.apply(engine_module)
|
|
66
70
|
end
|
|
67
71
|
|
|
@@ -71,7 +75,8 @@ module LesliTesting
|
|
|
71
75
|
L2.info(
|
|
72
76
|
"Running Lesli tests...",
|
|
73
77
|
"For a better result run test over a clean database",
|
|
74
|
-
"You can use: rake dev:db:reset"
|
|
78
|
+
"You can use: rake dev:db:reset"
|
|
79
|
+
)
|
|
75
80
|
|
|
76
81
|
L2.br
|
|
77
82
|
end
|
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.
|
|
4
|
+
version: 1.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- The Lesli Development Team
|
|
@@ -121,20 +121,6 @@ dependencies:
|
|
|
121
121
|
- - ">="
|
|
122
122
|
- !ruby/object:Gem::Version
|
|
123
123
|
version: '0'
|
|
124
|
-
- !ruby/object:Gem::Dependency
|
|
125
|
-
name: propshaft
|
|
126
|
-
requirement: !ruby/object:Gem::Requirement
|
|
127
|
-
requirements:
|
|
128
|
-
- - ">="
|
|
129
|
-
- !ruby/object:Gem::Version
|
|
130
|
-
version: '0'
|
|
131
|
-
type: :runtime
|
|
132
|
-
prerelease: false
|
|
133
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
134
|
-
requirements:
|
|
135
|
-
- - ">="
|
|
136
|
-
- !ruby/object:Gem::Version
|
|
137
|
-
version: '0'
|
|
138
124
|
description: "Core testing utilities for the Lesli Platform, providing standardized
|
|
139
125
|
Minitest configuration, \ncoverage setup, and shared testing conventions across
|
|
140
126
|
engines and applications.\n"
|