diff --git a/lib/jasmine/files_list.rb b/lib/jasmine/files_list.rb
index 9ee7891..3b4de7d 100644
--- a/lib/jasmine/files_list.rb
+++ b/lib/jasmine/files_list.rb
@@ -15,6 +15,8 @@ module Jasmine
@files = DEFAULT_FILES.dup
@filtered_files = @files.dup
use_config! if config?
+
+ @code_for_file = {}
end
def use_spec?(file)
@@ -36,7 +38,9 @@ module Jasmine
private
def to_html(files)
files.collect { |file|
- case File.extname(file)
+ next @code_for_file[file] if @code_for_file[file]
+
+ @code_for_file[file] = (case File.extname(file)
when '.js'
%{}
when '.coffee'
@@ -50,7 +54,7 @@ module Jasmine
end
when '.css'
%{}
- end
+ end)
}
end