Module: Minitest::Docker::Commands
- Defined in:
- lib/minitest/docker/commands.rb
Defined Under Namespace
Modules: Assertions
Instance Method Summary collapse
Instance Method Details
#all_container_names ⇒ Object
10 11 12 13 14 |
# File 'lib/minitest/docker/commands.rb', line 10 def all_container_names ::Docker::Container.all.map do |container| container.info['Names'].min_by(&:length) end end |
#container(id) ⇒ Object
4 5 6 7 8 |
# File 'lib/minitest/docker/commands.rb', line 4 def container(id) container = ::Docker::Container.find(id) raise "could not find #{id} in #{all_container_names}" unless container container end |
#stdout(output) ⇒ Object
16 17 18 |
# File 'lib/minitest/docker/commands.rb', line 16 def stdout(output) output.first.join.strip end |