Class: Superbot::Cloud::CLI::Test::ListCommand
- Inherits:
-
BaseCommand
- Object
- Clamp::Command
- LoginRequiredCommand
- OrganizationBasedCommand
- BaseCommand
- Superbot::Cloud::CLI::Test::ListCommand
- Defined in:
- lib/superbot/cloud/cli/test/list_command.rb
Instance Method Summary collapse
Methods inherited from LoginRequiredCommand
Methods included from Validations
Instance Method Details
#execute ⇒ Object
10 11 12 |
# File 'lib/superbot/cloud/cli/test/list_command.rb', line 10 def execute list_tests end |
#list_tests ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/superbot/cloud/cli/test/list_command.rb', line 14 def list_tests api_response = Superbot::Cloud::Api.request(:test_list, params: { organization_name: organization }) if quiet? puts(api_response[:tests].map { |test| test[:name] }) else puts "Organization: #{api_response[:organization]}" puts "Tests:" api_response[:tests].each do |test| puts(test[:name], test[:files].map { |f| "- #{f[:filename]}" }) end end end |