country_name = ARGV.shift
outcome_name = ARGV.shift

filename = 'marriage-abroad-responses-and-expected-results.yml'
filepath = Rails.root.join('test', 'data', filename)

yaml = File.read(filepath)
responses_and_expected_results = YAML.load(yaml)

data_for_outcome_and_country = responses_and_expected_results.select do |hash|
  hash[:next_node] == outcome_name.to_sym &&
    hash[:responses].first == country_name
end

response_sets = data_for_outcome_and_country.map do |hash|
  hash[:responses]
end

response_sets.each do |responses|
  puts responses.join(', ')
end

Add script to list responses for country and outcome
Add script to list responses for country and outcome

This displays the responses for the specified country that lead to the
specified outcome.

It's going to help me when extracting the marriage-abroad services from the
templates.
