     end
 
     test :rmdir_with_file do
-      assert File.rmdir(fixture_path("file.txt")) == { :error, :enotdir }
+      assert (File.rmdir(fixture_path("file.txt")) |> is_io_error?)
     end
 
     test :rmdir! do

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


     assert src_mode == dest_mode
    end

    defp is_io_error?(result) do
      {:error,errorcode} = result
      errorcode in [:enotdir, :eio, :enoent, :eisdir]
    end
    
  end

  defmodule Queries do
