Module: Dockerspec::RSpecAssertions

Defined in:
lib/dockerspec/rspec_assertions.rb

Overview

Some helper methods to check Dockerspec::RSpecResources#docker_run` arguments and output understandable error messages.

Constant Summary collapse

DOCKER_RUN_ALWAYS_MESSAGE =

A message with description on how to avoid the error in Serverspec::Runner#docker_run

<<-EOE

Remember to include the Serverspec library:

    require 'dockerspec'
    require 'dockerspec/serverspec'

EOE

Class Method Summary collapse

Class Method Details

.assert_docker_run!(_opts) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Raises and exception with instructions on how to fix it.

Returns:

  • void

Raises:



50
51
52
# File 'lib/dockerspec/rspec_assertions.rb', line 50

def self.assert_docker_run!(_opts)
  fail DockerRunArgumentError, DOCKER_RUN_ALWAYS_MESSAGE
end