diff --git a/spec/croupier_spec.cr b/spec/croupier_spec.cr index c853038..3bf4545 100644 --- a/spec/croupier_spec.cr +++ b/spec/croupier_spec.cr @@ -210,8 +210,6 @@ describe "Task" do it "should fail if a no_save task doesn't generate the output when called" do with_scenario("empty") do - File.delete?("output2") # Make sure this doesn't exist - TaskManager.cleanup b = TaskProc.new { "" } @@ -226,6 +224,22 @@ describe "Task" do end end end + + it "should record hash for outputs in the TaskManager" do + with_scenario("empty") do + t = Task.new( + "name", + "output2", + [] of String, + TaskProc.new { + "sarasa" + }, + ) + t.run + TaskManager.next_run["output2"].should eq \ + "609df08764e873e6f090a0064b38b2c5422cdf87" + end + end end describe "stale?" do diff --git a/spec/files/.keep b/spec/files/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/src/croupier.cr b/src/croupier.cr index 3eab590..06419a1 100644 --- a/src/croupier.cr +++ b/src/croupier.cr @@ -137,7 +137,6 @@ module Croupier Dir.mkdir_p(File.dirname output) File.open(output, "w") do |io| io << data[i] - # FIXME add tests for this TaskManager.next_run[output] = Digest::SHA1.hexdigest(data[i].to_s) end end