packs-rails-minitest 0.1.2 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/packs/rails/minitest/version.rb +1 -1
- data/lib/tasks/packs/test.rake +16 -15
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '096f9352f62c9c220cd67c01cd64df1d36860e76c2c4ef8fc661163d0be58edd'
|
4
|
+
data.tar.gz: 58bc4532e0107064c941464b7fb7e499e49a399b9dceb2ac56b6cfba2324c0b9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7c317a94d61bbd85c8490f04d75d92ebe4a16311f24dc53637d2527ecda3bf8735e9f529155e7634d21b40f5c8a973238dd9755be3abcfdda752e2d848360f81
|
7
|
+
data.tar.gz: ef9f7e1828dcae3dee7d0f874b91a86db4bd46eaeff65d2eca9a3c4c05c56363f39e354ab7324ce90ad9a7abfcd74e764aab4af14a7169cf6bbaa8b4de34a178
|
data/lib/tasks/packs/test.rake
CHANGED
@@ -1,38 +1,39 @@
|
|
1
|
+
run_tests = ->(*args) do
|
2
|
+
opts = ENV.key?("TESTOPTS") ? ENV["TESTOPTS"].shellsplit : []
|
3
|
+
system("rails", "test", *args, *opts) || exit($?.exitstatus)
|
4
|
+
end
|
5
|
+
|
1
6
|
namespace :packs do
|
7
|
+
|
2
8
|
task test: "test:prepare" do
|
3
9
|
ENV["DEFAULT_TEST"] = "{#{Packs.all.map(&:relative_path).join(",")}}/test/**/*_test.rb"
|
4
10
|
ENV["DEFAULT_TEST_EXCLUDE"] = "{#{Packs.all.map(&:relative_path).join(",")}}/test/{system,dummy}/**/*_test.rb"
|
5
|
-
|
11
|
+
run_tests.call
|
6
12
|
end
|
7
13
|
|
8
14
|
namespace :test do
|
9
15
|
multitask prepare: Packs.all.map { |pack| "#{pack.name}:prepare" }
|
10
16
|
|
11
17
|
task all: :prepare do
|
12
|
-
|
18
|
+
run_tests.call(*Packs.all.map { |pack| pack.relative_path.join("test/**/*_test.rb").to_s })
|
13
19
|
end
|
14
20
|
|
15
21
|
task system: :prepare do
|
16
|
-
|
22
|
+
run_tests.call(*Packs.all.map { |pack| pack.relative_path.join("test/system/**/*_test.rb").to_s })
|
17
23
|
end
|
18
24
|
|
19
25
|
Packs.all.each do |pack|
|
20
26
|
task pack.name => "#{pack.name}:prepare" do
|
21
27
|
ENV["DEFAULT_TEST"] = pack.relative_path.join("test/**/*_test.rb").to_s
|
22
28
|
ENV["DEFAULT_TEST_EXCLUDE"] = pack.relative_path.join("test/{system,dummy}/**/*_test.rb").to_s
|
23
|
-
|
29
|
+
run_tests.call
|
24
30
|
end
|
25
31
|
|
26
32
|
namespace pack.name do
|
27
33
|
multitask :prepare
|
28
34
|
|
29
|
-
task
|
30
|
-
|
31
|
-
end
|
32
|
-
|
33
|
-
task system: :prepare do
|
34
|
-
system("rails", "test", pack.relative_path.join("test/system/**/*_test.rb").to_s)
|
35
|
-
end
|
35
|
+
task(all: :prepare) { run_tests.call(pack.relative_path.join("test/**/*_test.rb").to_s) }
|
36
|
+
task(system: :prepare) { run_tests.call(pack.relative_path.join("test/system/**/*_test.rb").to_s) }
|
36
37
|
end
|
37
38
|
end
|
38
39
|
end
|
@@ -47,19 +48,19 @@ if Rails.configuration.packs_rails_minitest.override_tasks
|
|
47
48
|
ENV["DEFAULT_TEST"] = "{.,#{Packs.all.map(&:relative_path).join(",")}}/test/**/*_test.rb"
|
48
49
|
ENV["DEFAULT_TEST_EXCLUDE"] = "{.,#{Packs.all.map(&:relative_path).join(",")}}/test/{system,dummy}/**/*_test.rb"
|
49
50
|
if ENV.key? "TEST"
|
50
|
-
|
51
|
+
run_tests.call(ENV["TEST"])
|
51
52
|
else
|
52
|
-
|
53
|
+
run_tests.call
|
53
54
|
end
|
54
55
|
end
|
55
56
|
|
56
57
|
namespace :test do
|
57
58
|
multitask all: [:prepare, "packs:test:prepare"] do |_, args|
|
58
|
-
|
59
|
+
run_tests.call("test/**/*_test.rb", *Packs.all.map { |pack| pack.relative_path.join("test/**/*_test.rb").to_s })
|
59
60
|
end
|
60
61
|
|
61
62
|
multitask system: [:prepare, "packs:test:prepare"] do |_, args|
|
62
|
-
|
63
|
+
run_tests.call("test/system/**/*_test.rb", *Packs.all.map { |pack| pack.relative_path.join("test/system/**/*_test.rb").to_s })
|
63
64
|
end
|
64
65
|
end
|
65
66
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: packs-rails-minitest
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Graham Rogers
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-03-
|
11
|
+
date: 2023-03-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: packs
|