       fixture = fixture_path("file.txt")
       invalid = Path.join fixture, "test"
       assert File.exists?(fixture)
-      assert File.mkdir(invalid) == { :error, :enotdir }
+      assert (File.mkdir(invalid) |> is_io_error?)
       refute File.exists?(invalid)
     end
 

        File.rm_rf!(fixture)
      end
    end
  end

  test :stat do


      try do
        File.touch!(dest)
        assert (File.cp_r(src, dest) |> is_io_error?)
      after
        File.rm_rf dest
      end
