test/test_slide.rb in rapinoe-0.0.1 vs test/test_slide.rb in rapinoe-0.0.2

- old
+ new

@@ -21,6 +21,18 @@ assert File.exist?(tempfile) assert_operator File.size(tempfile), :>, 1484 ensure File.delete tempfile end + + def test_write_preview_to_new_dir_and_file + tempfile = "/tmp/rapinoe/rapinoe-slide-preview.jpg" + + refute File.exist?(tempfile) + @slide.write_preview_to_file(tempfile) + + assert File.exist?(tempfile) + assert_operator File.size(tempfile), :>, 1484 + ensure + FileUtils.rm_rf "/tmp/rapinoe" + end end