Files
chromebrew/tests/commands/prop.rb
SupeChicken666 91f0f2ac98 lib/package: Get rid of eval strings (#10117)
* lib/package: Cleanup functions, get rid of `eval` strings

Signed-off-by: supechicken <me@supechicken666.dev>

* Fix error

Signed-off-by: supechicken <me@supechicken666.dev>

* Fix error

Signed-off-by: supechicken <me@supechicken666.dev>

* Add comments

Signed-off-by: supechicken <me@supechicken666.dev>

* Make rubocop happy

Signed-off-by: supechicken <me@supechicken666.dev>

* Fix error

Signed-off-by: supechicken <me@supechicken666.dev>

* Simplify

Signed-off-by: supechicken <me@supechicken666.dev>

* Bump crew version

Signed-off-by: supechicken <me@supechicken666.dev>

---------

Signed-off-by: supechicken <me@supechicken666.dev>
2024-07-10 14:49:10 -05:00

34 lines
996 B
Ruby

require 'minitest/autorun'
require_relative '../../commands/prop'
require_relative '../../lib/package'
class PropCommandTest < Minitest::Test
def test_no_arguments
expected_output = <<~EOT
Explain the purpose of various package boolean properties.
Usage: crew prop <property>
Available properties: #{Package.available_boolean_properties.join(', ')}
EOT
assert_output expected_output, nil do
Command.prop(nil)
end
end
def test_no_env_options_property
expected_output = <<~EOT
Use the 'no_env_options' property for packages that do not require
environment options or to override the default options.
EOT
assert_output expected_output, nil do
Command.prop('no_env_options')
end
end
def test_is_static_property
expected_output = "Use the 'is_static' property for packages which do not require shared dependencies.\n"
assert_output expected_output, nil do
Command.prop('is_static')
end
end
end