Skip to content

Commit

Permalink
Refactoring tests
Browse files Browse the repository at this point in the history
Signed-off-by: Nicolas Lamirault <nicolas.lamirault@gmail.com>
  • Loading branch information
nlamirault committed Aug 12, 2016
1 parent 18ad3a2 commit 40830a9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
7 changes: 3 additions & 4 deletions test/dionysos-io-test.el
Expand Up @@ -55,10 +55,10 @@


(ert-deftest test-dionysos-extract-id3-tags ()
:tags '(io current)
:tags '(io)
(with-test-sandbox
(with-music-file
"resources/France.mp3"
(with-music-file-2
file "resources/France.mp3"
(let ((tags (dionysos--id3-tag-info file)))
(should (string-equal "ID3v2.3" (gethash "Metadata" tags)))
(should (string-equal "hymne france - france anthem" (gethash "Title" tags)))
Expand All @@ -67,6 +67,5 @@
(should (string-equal "Other" (gethash "Genre" tags)))))))



(provide 'dionysos-io-test)
;;; dionysos-io-test.el ends here
3 changes: 3 additions & 0 deletions test/test-helper.el
Expand Up @@ -79,6 +79,9 @@
`(let ((file (f-join dionysos-testsuite-dir ,filename)))
,@body))

(defmacro with-music-file-2 (file filename &rest body)
`(let ((,file (f-join dionysos-testsuite-dir ,filename)))
,@body))

(defmacro with-test-sandbox (&rest body)
"Evaluate BODY in an empty sandbox directory."
Expand Down

0 comments on commit 40830a9

Please sign in to comment.