diff --git a/lib/jasmine/files_list.rb b/lib/jasmine/files_list.rb
index add28e1..fe18b1d 100644
--- a/lib/jasmine/files_list.rb
+++ b/lib/jasmine/files_list.rb
@@ -40,8 +40,6 @@ module Jasmine
coffeescript_run = []
files.collect { |file|
- next @code_for_file[file] if @code_for_file[file]
-
coffeescript_run << file if (ext = File.extname(file)) == '.coffee'
output = []
@@ -58,7 +56,7 @@ module Jasmine
end
end
- @code_for_file[file] = output
+ output
}.flatten.reject(&:empty?)
end
diff --git a/spec/lib/jasmine/files_list_spec.rb b/spec/lib/jasmine/files_list_spec.rb
index b11e00c..6f7fcff 100644
--- a/spec/lib/jasmine/files_list_spec.rb
+++ b/spec/lib/jasmine/files_list_spec.rb
@@ -166,12 +166,12 @@ describe Jasmine::FilesList do
File.open('test.coffee', 'w') { |fh| fh.print "first" }
File.open('test2.coffee', 'w') { |fh| fh.print "second" }
-
- CoffeeScript.stubs(:compile).with() { |field| field.read == "firstsecond" }.returns("i compiled")
end
context '#files_to_html' do
it "should create the right HTML" do
+ CoffeeScript.stubs(:compile).with() { |field| field.read == "firstsecond" }.returns("i compiled")
+
files_list.files_to_html.should == [
%{},
%{},
@@ -179,6 +179,17 @@ describe Jasmine::FilesList do
]
end
end
+
+ context '#filtered_files_to_html' do
+ it "should create the right HTML" do
+ CoffeeScript.stubs(:compile).with() { |field| field.read == "first" }.returns("i compiled")
+
+ files_list.filtered_files_to_html.should == [
+ %{},
+ %{}
+ ]
+ end
+ end
end
end
end