class Object

Public Instance Methods

get_expected_and_actual_call_strings(actual_command, expected_argument_list) click to toggle source
# 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