Skip to content

Commit 0f36258

Browse files
committed
Add mutant test primary CLI
1 parent cdd3956 commit 0f36258

File tree

13 files changed

+41
-26
lines changed

13 files changed

+41
-26
lines changed

Changelog.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
# v0.13.1 2025-03-23
2+
3+
Add new `mutant test` primary subcommand. This subcommand allows
4+
to run rspec (or minitest) tests via mutants *parallel* test runner.
5+
6+
Standard precautions to correctly synchronize or isolate global resources
7+
(fileystems / database) apply.
8+
19
# v0.13.0 2025-03-23
210

311
Significant unparser upgrade. Mutant now:

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
mutant (0.13.0)
4+
mutant (0.13.1)
55
diff-lcs (~> 1.3)
66
parser (~> 3.3.0)
77
regexp_parser (~> 2.10)

lib/mutant/cli/command/environment/test.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,12 @@ def from_result(result)
6363
Either::Left.new('Test failures, exiting nonzero!')
6464
end
6565
end
66+
67+
# Alias to root mount
68+
class Root < self
69+
NAME = 'test'
70+
SUBCOMMANDS = EMPTY_ARRAY
71+
end
6672
end
6773

6874
SUBCOMMANDS = [List, Run].freeze

lib/mutant/cli/command/root.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class Environment < self
1010
class Root < self
1111
NAME = 'mutant'
1212
SHORT_DESCRIPTION = 'mutation testing engine main command'
13-
SUBCOMMANDS = [Environment::Run, Environment, Util].freeze
13+
SUBCOMMANDS = [Environment::Run, Environment::Test::Run::Root, Environment, Util].freeze
1414
end # Root
1515
end # Command
1616
end # CLI

lib/mutant/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22

33
module Mutant
44
# Current mutant version
5-
VERSION = '0.13.0'
5+
VERSION = '0.13.1'
66
end # Mutant

spec/unit/mutant/cli_spec.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ def self.make
104104
# rubocop:disable Metrics/MethodLength
105105
def self.main_body
106106
<<~MESSAGE.strip
107-
usage: mutant <run|environment|util> [options]
107+
usage: mutant <run|test|environment|util> [options]
108108
109109
Summary: mutation testing engine main command
110110
@@ -120,6 +120,7 @@ def self.main_body
120120
Available subcommands:
121121
122122
run - Run code analysis
123+
test - Run tests
123124
environment - Environment subcommands
124125
util - Utility subcommands
125126
MESSAGE

test_app/Gemfile.minitest.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
PATH
22
remote: ..
33
specs:
4-
mutant (0.13.0)
4+
mutant (0.13.1)
55
diff-lcs (~> 1.3)
66
parser (~> 3.3.0)
77
regexp_parser (~> 2.10)
88
sorbet-runtime (~> 0.5.0)
99
unparser (~> 0.7.0)
10-
mutant-minitest (0.13.0)
10+
mutant-minitest (0.13.1)
1111
minitest (~> 5.11)
12-
mutant (= 0.13.0)
12+
mutant (= 0.13.1)
1313
mutex_m (~> 0.2)
1414

1515
GEM

test_app/Gemfile.rspec3.10.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
PATH
22
remote: ..
33
specs:
4-
mutant (0.13.0)
4+
mutant (0.13.1)
55
diff-lcs (~> 1.3)
66
parser (~> 3.3.0)
77
regexp_parser (~> 2.10)
88
sorbet-runtime (~> 0.5.0)
99
unparser (~> 0.7.0)
10-
mutant-rspec (0.13.0)
11-
mutant (= 0.13.0)
10+
mutant-rspec (0.13.1)
11+
mutant (= 0.13.1)
1212
rspec-core (>= 3.8.0, < 4.0.0)
1313

1414
GEM

test_app/Gemfile.rspec3.11.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
PATH
22
remote: ..
33
specs:
4-
mutant (0.13.0)
4+
mutant (0.13.1)
55
diff-lcs (~> 1.3)
66
parser (~> 3.3.0)
77
regexp_parser (~> 2.10)
88
sorbet-runtime (~> 0.5.0)
99
unparser (~> 0.7.0)
10-
mutant-rspec (0.13.0)
11-
mutant (= 0.13.0)
10+
mutant-rspec (0.13.1)
11+
mutant (= 0.13.1)
1212
rspec-core (>= 3.8.0, < 4.0.0)
1313

1414
GEM

test_app/Gemfile.rspec3.12.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
PATH
22
remote: ..
33
specs:
4-
mutant (0.13.0)
4+
mutant (0.13.1)
55
diff-lcs (~> 1.3)
66
parser (~> 3.3.0)
77
regexp_parser (~> 2.10)
88
sorbet-runtime (~> 0.5.0)
99
unparser (~> 0.7.0)
10-
mutant-rspec (0.13.0)
11-
mutant (= 0.13.0)
10+
mutant-rspec (0.13.1)
11+
mutant (= 0.13.1)
1212
rspec-core (>= 3.8.0, < 4.0.0)
1313

1414
GEM
@@ -57,4 +57,4 @@ DEPENDENCIES
5757
rspec-core (~> 3.9)
5858

5959
BUNDLED WITH
60-
2.5.22
60+
2.6.2

0 commit comments

Comments
 (0)