I have following methods in my model
def get_performance_data para, child_para_hash
performance_graph_data = {}
child_para_hash.each do |cp|
performance_graph_data[cp] = fetch_per_child_para_data(para, cp)
end
performance_graph_data
end
def fetch_per_child_para_data para, child_para
test_performances.where(network_data_condition(para, child_para)).select("AVG(value)avg_value, activity").group('act_num')
end
I am having problems in understanding how to write test cases for each loop in model methods.