19: def test01_rb_files
20: files = copyright_files(File.expand_path(RAILS_ROOT) + '/app')
21: files = files + copyright_files(File.expand_path(RAILS_ROOT) + '/db')
22: files = files + copyright_files(File.expand_path(RAILS_ROOT) + '/lib')
23: files = files + copyright_files(File.expand_path(RAILS_ROOT) + '/test')
24: files = files - [File.expand_path(RAILS_ROOT) + '/db/schema.rb']
25: files_without = []
26: files.each do |file|
27: content = IO.readlines(file).join
28: if content.index('# Copyright (c)')
29: else
30: files_without << file
31: end
32: end
33: logger.info("Files without copyright notice #{files_without.size} from total #{files.size}")
34: assert_equal [], files_without
35: end