     end
 
     test "cp! with src dir" do
-      src   = fixture_path("cp_r")
-      dest  = tmp_path("tmp.file")
-      assert_raise File.CopyError, "could not copy from #{inspect(src)} " <>
-          "to #{inspect(dest)}: illegal operation on a directory", fn ->
+      src = fixture_path("cp_r")
+      dest = tmp_path("tmp.file")
+
+      message =
+        "could not copy from #{inspect(src)} to #{inspect(dest)}: illegal operation on a directory"
+
+      assert_raise File.CopyError, message, fn ->
         File.cp!(src, dest)
       end
     end

        assert File.rename(src, dest) == :ok
        assert File.exists?(src)
      after
        File.rm_rf src
        File.rm_rf dest
      end
    end

    test "rename parent dir to existing sub dir" do
      src  = tmp_fixture_path("cp_r")
      dest = tmp_path("cp_r/a")
      try do
        assert File.exists?(src)
        assert File.rename(src, dest) == {:error, :einval}
        assert File.exists?(src)
      after
        File.rm_rf src
        File.rm_rf dest
      end
    end

    test "rename parent dir to non-existing sub dir" do
      src  = tmp_fixture_path("cp_r")
      dest = tmp_path("cp_r/x")
      try do
        assert File.exists?(src)
        assert File.rename(src, dest) == {:error, :einval}
        assert File.exists?(src)
        refute File.exists?(dest)
      after
        File.rm_rf src
        File.rm_rf dest
      end
    end

    test "rename dir to existing empty dir default behaviour" do
      src  = tmp_fixture_path("cp_r")
      dest = tmp_path("tmp")

      File.mkdir(dest)

    end

    test "rm_rf! with invalid path" do
      fixture = fixture_path("file.txt/path")
      assert File.rm_rf!(fixture) == []
    end

