Sha256: a3d1634164e51b80fba62de4b42fe0500823f8a4456cb0b267c81713a8b590d4

Contents?: true

Size: 798 Bytes

Versions: 2

Compression:

Stored size: 798 Bytes

Contents

describe 'executables\' Cmd Runner options' do

  # Setup a platform for tests
  #
  # Parameters::
  # * *block* (Proc): Code called when the platform is setup
  #   * Parameters::
  #     * *repository* (String): Platform's repository
  def with_test_platform_for_cmd_runner_options(&block)
    with_test_platform({ nodes: { 'node' => {} } }, &block)
  end

  it 'displays commands instead of running them' do
    with_test_platform_for_cmd_runner_options do
      expect_actions_executor_runs([proc do
        expect(test_cmd_runner.dry_run).to be true
        {}
      end])
      exit_code, stdout, stderr = run 'run', '--node', 'node', '--command', 'echo Hello', '--show-commands'
      expect(exit_code).to eq 0
      expect(stdout).to eq ''
      expect(stderr).to eq ''
    end
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
hybrid_platforms_conductor-33.9.5 spec/hybrid_platforms_conductor_test/executables/options/cmd_runner_spec.rb
hybrid_platforms_conductor-33.9.4 spec/hybrid_platforms_conductor_test/executables/options/cmd_runner_spec.rb