#!/usr/local/bin/ruby -w # TODO: Probably has dup code with ZenTest. # TODO: Map controller assert_assigns to view test ivar assignments. # TODO: Make this a rake task, rake test:audit. # test_cases[test_case][test][ivar] = value def build_test_cases(type) test_cases = Hash.new { |h,k| h[k] = Hash.new { |h,k| h[k] = Hash.new { |h,k| h[k] = {} } } } test_case = nil test = nil fixtures = Hash.new { |h,k| h[k] = [] } Dir["test/#{type}/*rb"].each do |test| File.open test do |fp| fp.each_line do |line| case line when /^class (.*)(View|Controller)Test