Created
May 19, 2015 15:04
-
-
Save MonkeyIsNull/71b2d030cb66acaeed63 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule FileripperTest do | |
use ExUnit.Case, async: true | |
@test_files_path "fixtures/test" | |
setup do | |
File.mkdir_p(@test_files_path) | |
on_exit fn -> | |
IO.puts "End of test case" | |
File.rm_rf(@test_files_path) | |
end | |
:ok | |
end | |
test "creating some files" do | |
IO.puts "Test one" | |
File.mkdir_p(@test_files_path <> "/1") | |
File.touch(@test_files_path <> "/1/first") | |
File.touch(@test_files_path <> "/1/second") | |
assert File.exists?(@test_files_path <> "/1/second") | |
end | |
test "creating some more files" do | |
IO.puts "Test two" | |
File.mkdir_p(@test_files_path <> "/1") | |
File.touch(@test_files_path <> "/1/cats") | |
assert File.exists?(@test_files_path <> "/1/cats") | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment