[Solved] Rspec pass test in ruby testing

solution.highest_count_words_across_lines is an array of strings. When you do this: solution.highest_count_words_across_lines.map(&:highest_wf_words) you are calling highest_wf_words on each of the array items, and that method is not defined for a String (that is what the error message says). I guess that in fact you want something like this instead: words_found = solution.highest_count_words_across_lines.map( |x| highest_wf_words(x)).flatten UPDATE if … Read more