 
     test "open! a missing file" do
       message = "could not open \"missing.txt\": no such file or directory"
+
       assert_raise File.Error, message, fn ->
         File.open!('missing.txt')
       end

        assert File.cp(src, dest) == :ok
        assert File.read!(dest) == "FOO\n"
      after
        File.rm_rf dest
      end
    end

    test "cp with conflict with function" do
      src   = fixture_path("file.txt")
      dest  = tmp_path("tmp.file")

      File.write!(dest, "hello")

      try do
        assert File.exists?(dest)
        assert File.cp(src, dest, fn(src_file, dest_file) ->
          assert src_file  == src
          assert dest_file == dest
          false
        end) == :ok
        assert File.read!(dest) == "hello"
      after
        File.rm_rf dest
      end
    end

    test "cp! with src file and dest file" do
      src  = fixture_path("file.txt")
      dest = tmp_path("sample.txt")

      File.touch(dest)


    test "rmdir! with file" do
      fixture = fixture_path("file.txt")
      message = ~r"\Acould not remove directory #{inspect(fixture)}: (not a directory|I/O error)"

      assert_raise File.Error, message, fn ->
        File.rmdir!(fixture)
      end
    end
