packs-rails-minitest 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 33289367f34dd0f850b82b3a7630ed59a8d13baac106e2b0da5d937bd4be211b
4
- data.tar.gz: 6ac5cc2a020bad866dd06e9b41f890a8172dab7b292be0251f6e04b1e6047751
3
+ metadata.gz: 0af4760c8ebd6d083516a7f4be43c417f00e37e1eb7a764c01eec643e045883d
4
+ data.tar.gz: 9cb08376463bd7fe2a7756df2c693f1ddf94b9e972a429ec5c527e091b0cfb9a
5
5
  SHA512:
6
- metadata.gz: a0ece2ad345375fbb1f03ae6665061d272973a2ba00b8659e14e66b4d1dac3d9f2f40cc9488cf6e12fd760d96cd496515b4f3d5003263265961244081f8d7d1d
7
- data.tar.gz: 368bef89616a98172e4b97e4bdad018325d4c24712667b194a7792e21386ca1cb0d93a07e20fa5991d72e8c300f908b3cab7c4d12419195a51e83c8d1b1d89d5
6
+ metadata.gz: 6988173415813cef847aa6b632f12f748bc91d7a0fdda83a02e9dcf92ea867294dd2621fccfd144140982b86c60caed3ef7eda6fcb3becbcd588b1a2092d8ba7
7
+ data.tar.gz: 92f984cf364fd9a33e21021d5028cff4108d585550f96d3b0f873eacef7c91a70f8ed69cd99229c8165b7730114ac658cc57e0dbb1b879c8a24a5ed7de80faed
@@ -1,7 +1,7 @@
1
1
  module Packs
2
2
  module Rails
3
3
  module Minitest
4
- VERSION = "0.1.2"
4
+ VERSION = "0.1.3"
5
5
  end
6
6
  end
7
7
  end
@@ -1,38 +1,36 @@
1
+ run_tests = ->(*args) { system("rails", "test", *args) || exit($?.exitstatus) }
2
+
1
3
  namespace :packs do
4
+
2
5
  task test: "test:prepare" do
3
6
  ENV["DEFAULT_TEST"] = "{#{Packs.all.map(&:relative_path).join(",")}}/test/**/*_test.rb"
4
7
  ENV["DEFAULT_TEST_EXCLUDE"] = "{#{Packs.all.map(&:relative_path).join(",")}}/test/{system,dummy}/**/*_test.rb"
5
- system("rails", "test")
8
+ run_tests.call
6
9
  end
7
10
 
8
11
  namespace :test do
9
12
  multitask prepare: Packs.all.map { |pack| "#{pack.name}:prepare" }
10
13
 
11
14
  task all: :prepare do
12
- system("rails", "test", *Packs.all.map { |pack| pack.relative_path.join("test/**/*_test.rb").to_s })
15
+ run_tests.call(*Packs.all.map { |pack| pack.relative_path.join("test/**/*_test.rb").to_s })
13
16
  end
14
17
 
15
18
  task system: :prepare do
16
- system("rails", "test", *Packs.all.map { |pack| pack.relative_path.join("test/system/**/*_test.rb").to_s })
19
+ run_tests.call(*Packs.all.map { |pack| pack.relative_path.join("test/system/**/*_test.rb").to_s })
17
20
  end
18
21
 
19
22
  Packs.all.each do |pack|
20
23
  task pack.name => "#{pack.name}:prepare" do
21
24
  ENV["DEFAULT_TEST"] = pack.relative_path.join("test/**/*_test.rb").to_s
22
25
  ENV["DEFAULT_TEST_EXCLUDE"] = pack.relative_path.join("test/{system,dummy}/**/*_test.rb").to_s
23
- system("rails", "test")
26
+ run_tests.call
24
27
  end
25
28
 
26
29
  namespace pack.name do
27
30
  multitask :prepare
28
31
 
29
- task all: :prepare do
30
- system("rails", "test", pack.relative_path.join("test/**/*_test.rb").to_s)
31
- end
32
-
33
- task system: :prepare do
34
- system("rails", "test", pack.relative_path.join("test/system/**/*_test.rb").to_s)
35
- end
32
+ task(all: :prepare) { run_tests.call(pack.relative_path.join("test/**/*_test.rb").to_s) }
33
+ task(system: :prepare) { run_tests.call(pack.relative_path.join("test/system/**/*_test.rb").to_s) }
36
34
  end
37
35
  end
38
36
  end
@@ -47,19 +45,19 @@ if Rails.configuration.packs_rails_minitest.override_tasks
47
45
  ENV["DEFAULT_TEST"] = "{.,#{Packs.all.map(&:relative_path).join(",")}}/test/**/*_test.rb"
48
46
  ENV["DEFAULT_TEST_EXCLUDE"] = "{.,#{Packs.all.map(&:relative_path).join(",")}}/test/{system,dummy}/**/*_test.rb"
49
47
  if ENV.key? "TEST"
50
- system("rails", "test", ENV["TEST"])
48
+ run_tests.call(ENV["TEST"])
51
49
  else
52
- system("rails", "test")
50
+ run_tests.call
53
51
  end
54
52
  end
55
53
 
56
54
  namespace :test do
57
55
  multitask all: [:prepare, "packs:test:prepare"] do |_, args|
58
- system("rails", "test", "test/**/*_test.rb", *Packs.all.map { |pack| pack.relative_path.join("test/**/*_test.rb").to_s })
56
+ run_tests.call("test/**/*_test.rb", *Packs.all.map { |pack| pack.relative_path.join("test/**/*_test.rb").to_s })
59
57
  end
60
58
 
61
59
  multitask system: [:prepare, "packs:test:prepare"] do |_, args|
62
- system("rails", "test", "test/system/**/*_test.rb", *Packs.all.map { |pack| pack.relative_path.join("test/system/**/*_test.rb").to_s })
60
+ run_tests.call("test/system/**/*_test.rb", *Packs.all.map { |pack| pack.relative_path.join("test/system/**/*_test.rb").to_s })
63
61
  end
64
62
  end
65
63
  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.2
4
+ version: 0.1.3
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-14 00:00:00.000000000 Z
11
+ date: 2023-03-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: packs