-
-
Notifications
You must be signed in to change notification settings - Fork 152
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add mutant environment test list subcommand
- Loading branch information
Showing
7 changed files
with
111 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# frozen_string_literal: true | ||
|
||
module Mutant | ||
module CLI | ||
class Command | ||
class Environment | ||
class Test < self | ||
NAME = 'test' | ||
SHORT_DESCRIPTION = 'test subcommands' | ||
|
||
class List < self | ||
NAME = 'list' | ||
SHORT_DESCRIPTION = 'List tests detected in the environment' | ||
SUBCOMMANDS = EMPTY_ARRAY | ||
|
||
private | ||
|
||
def action | ||
bootstrap.fmap(&method(:list_tests)) | ||
end | ||
|
||
def list_tests(env) | ||
tests = env.integration.all_tests | ||
print('Tests in environment: %d' % tests.length) | ||
tests.each do |test| | ||
print(test.identification) | ||
end | ||
end | ||
end | ||
|
||
SUBCOMMANDS = [List].freeze | ||
end # Test | ||
end # Environment | ||
end # Command | ||
end # CLI | ||
end # Mutant |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters