diff --git a/lib/rexer/commands/envs.rb b/lib/rexer/commands/envs.rb index 0ddd6ad..957d628 100644 --- a/lib/rexer/commands/envs.rb +++ b/lib/rexer/commands/envs.rb @@ -6,9 +6,7 @@ def initialize end def call - defined_envs.each do - puts _1 - end + puts(*defined_envs) end private @@ -17,7 +15,7 @@ def call def defined_envs all_envs = definition.plugins.map(&:env) + definition.themes.map(&:env) - all_envs.uniq + all_envs.uniq.sort end end end diff --git a/test/integration/integration_test.rb b/test/integration/integration_test.rb index cd13b18..c777637 100644 --- a/test/integration/integration_test.rb +++ b/test/integration/integration_test.rb @@ -27,7 +27,7 @@ class IntegrationTest < Test::Unit::TestCase docker_exec("rex envs").then do |result| assert_true result.success? - assert_equal %w[default env1 env2 env3 env4].sort, result.output.sort + assert_equal %w[default env1 env2 env3 env4], result.output end docker_exec("rex install -q").then do |result|