Top Level Namespace

Includes:
RSpec::Mocks, RSpec::Mocks::ArgumentMatchers

Defined Under Namespace

Modules: Rspec

Instance Method Summary collapse

Instance Method Details

#get_expected_and_actual_call_strings(actual_command, expected_argument_list) ⇒ Object



40
41
42
43
44
45
46
47
48
49
# File 'lib/rspec/bash/matchers/called_with_arguments.rb', line 40

def get_expected_and_actual_call_strings(actual_command, expected_argument_list)
  command_name = actual_command.command

  formatted_expected_call = "#{command_name} #{expected_argument_list.join(' ')}"
  formatted_actual_calls = actual_command.call_log.call_log_arguments.map do |arg_array|
    "#{command_name} #{arg_array.join(' ')}"
  end.join("\n")

  [formatted_actual_calls, formatted_expected_call]
end