
966 A.2d 1231 (2009)
Cathy Lee BARRETTE
v.
Vincent John YAKAVONIS, M.D.
No. 2007-310-Appeal.
Supreme Court of Rhode Island.
March 20, 2009.
*1232 George Philip, Esq., for Plaintiff.
James A. Musgrave, Esq., Providence, for Defendant.
Present: GOLDBERG, Acting C.J., FLAHERTY, SUTTELL, ROBINSON, JJ., and WILLIAMS, C.J. (ret.).

OPINION
Acting Chief Justice GOLDBERG, for the Court.
This case came before the Supreme Court on January 26, 2009, pursuant to an order directing the parties to appear and show cause why the issues raised in this appeal should not summarily be decided. After hearing the arguments of counsel and examining the memoranda submitted *1233 by the parties, we are of the opinion that cause has not been shown and we shall decide this appeal without further briefing and argument. We affirm the judgment of the Superior Court.

Facts and Travel
The dispute in this case concerns the timeliness of a civil complaint seeking damages for medical malpractice. On June 9, 2006, the plaintiff, Cathy Lee Barrette (Barrette or plaintiff), filed a complaint in Superior Court against the defendant, Dr. Vincent John Yakavonis (defendant), alleging that on October 2, 2000, the defendant was negligent in diagnosing and treating her injuries. The complaint, however, failed to set forth any explanation that would shed light on the five-and-a-half-year interregnum from the time the defendant treated the plaintiff to the filing of the complaint.
The defendant moved to dismiss the complaint pursuant to Rule 12(b)(6) of the Superior Court Rules of Civil Procedure, arguing that the action was time-barred by the limitations set forth in G.L. 1956 § 9-1-14.1. The plaintiff argued in response that, because subsection (2) of the statute contains an exception to the three-year limitations period for medical malpractice cases in which the negligence was not discovered or discoverable, she would be entitled to relief in the event that defendant's alleged malpractice was not discovered until 2003 or 2004.
At a hearing on February 6, 2007, defendant's motion to dismiss was granted. Because the complaint failed to set forth any allegations relating to the discovery of plaintiffs alleged injuries that would have extended the period of limitations, the hearing justice dismissed the case and an order to that effect was entered on February 13, 2007.
Thereafter, on March 13, 2007, defendant moved for entry of final judgment; in response, plaintiff objected and filed a motion seeking leave to amend the complaint. At the hearing on these motions, plaintiff requested that her complaint be amended to state that "the injury was not discoverable until September of 2003," thus overcoming the statute-of-limitations issue. The hearing justice denied plaintiffs motion and noted that counsel had failed to file a proposed amended complaint setting forth the factual underpinnings that would warrant application of the discovery rule in § 9-1-14.1(2). On May 8, 2007, the hearing justice directed the entry of final judgment dismissing the complaint. The plaintiff timely appealed.[1]

Analysis
Before this Court, plaintiff contends that the hearing justice erroneously dismissed the complaint because neither Rule 8(a) of the Superior Court Rules of Civil Procedure nor § 9-1-14.1(2) require her to plead the discovery rule in her complaint. Alternatively, plaintiff avers that the hearing justice abused her discretion in denying plaintiffs motion to amend the complaint.

Pleading the Discovery Rule
We first will address plaintiffs argument that the hearing justice erred when she granted defendant's motion to dismiss. In reviewing the grant of a motion to dismiss pursuant to Rule 12(b)(6), this Court applies the same standard as the hearing justice. Dellefratte v. Estate *1234 of Dellefratte, 941 A.2d 797, 798 (R.I.2007) (mem.). "[T]his Court examines the allegations contained in the plaintiffs complaint, assumes them to be true, and views them in the light most favorable to the plaintiff." Palazzo v. Alves, 944 A.2d 144, 149 (R.I.2008) (citing Ellis v. Rhode Island Public Transit Authority, 586 A.2d 1055, 1057 (R.I.1991)). Because "the sole function of a motion to dismiss is to test the sufficiency of the complaint," our review is confined to the four corners of that pleading. Id. (quoting Rhode Island Affiliate, ACLU, Inc. v. Bernasconi, 557 A.2d 1232, 1232 (R.I.1989)). "The grant of a Rule 12(b)(6) motion to dismiss is appropriate `when it is clear beyond a reasonable doubt that the plaintiff would not be entitled to relief from the defendant under any set of facts that could be proven in support of the plaintiffs claim.'" Palazzo, 944 A.2d at 149-50 (quoting Ellis, 586 A.2d at 1057). A party may raise a statute-of-limitations defense by way of a motion to dismiss, "provid[ed] the alleged timing defect appears on the face of the complaint." Martin v. Howard, 784 A.2d 291, 297 (R.I.2001) (citing Boghossian v. Ferland Corp., 600 A.2d 288, 290 (R.I.1991)).
In her complaint, which was filed on June 9, 2006, Barrette alleged that defendant began to treat and care for her on or about October 2, 2000. The complaint does not account for the five-and-a-half-year delay in bringing suit; nor does it set forth allegations that the injury was such that in the exercise of reasonable diligence it was not discoverable until a date within three years of the commencement of the action. The plaintiff does not dispute this; instead she argues that neither Rule 8(a) nor § 9-1-14.1(2) require a party to plead the discovery rule. We reject this contention.
With respect to Rule 8(a), this Court has declared that "[a] pleading need not include `the ultimate facts that must be proven in order to succeed on the complaint * * * [or] * * * set out the precise legal theory upon which his or her claim is based.'" Gardner v. Baird, 871 A.2d 949, 953 (R.I.2005) (quoting Haley v. Town of Lincoln, 611 A.2d 845, 848 (R.I.1992)). Rather, Rule 8(a) merely requires that the complaint "provide the opposing party with `fair and adequate notice of the type of claim being asserted.'" Gardner, 871 A.2d at 953.
This does not mean, however, that a complaint will withstand a motion to dismiss based on a statute-of-limitations defense merely because it contains satisfactory notice of the substance of the claim. To hold otherwise would erode a party's right to move pursuant to Rule 12(b)(6) to dismiss a time-barred complaint. See Martin, 784 A.2d at 297. As provided by Rule 9(f) of the Superior Court Rules of Civil Procedure, "[f]or the purpose of testing the sufficiency of a pleading, averments of time and place are material[.]" In the words of Professor Kent, "[i]f the complaint discloses on its face that the claim is barred by the statute of limitations, the defense may be raised on a motion to dismiss under Rule 12(b)(6)." Kent, R.I. Civ. Prac. § 9:5 (2006). See also 5A Wright & Miller, Federal Practice and Procedure, Civil 3d § 1308 at 340 (2004) ("Under the normal rules of pleading, the statute of limitations is an affirmative defense and must be raised in the answer. Since Rule 9(f) makes allegations of time material, however, the defense of the statute may be raised on a motion to dismiss under Rule 12(b)(6) when it is apparent from the face of the complaint that the time limit for bringing the claim for relief has passed."). Accordingly, we are satisfied that plaintiffs contention that she was not required by Rule 8(a) to plead the discovery rule is without merit.
*1235 Barrette also argues that § 9-1-14.1 does not require her to refer to § 9-1-14.1(2) in the complaint. She suggests that by including the discovery rule in § 9-1-14.1(2), the Legislature afforded her an option to choose between the three-year limitations period set forth in § 9-1-14.1 or the discovery rule contained in subsection (2).
Section 9-1-14.1 provides in pertinent part:
"[A]n action for medical * * * malpractice shall be commenced within three (3) years from the time of the occurrence of the incident which gave rise to the action; provided, however, that:
"* * *
"(2) In respect to those injuries or damages due to acts of medical * * * malpractice which could not in the exercise of reasonable diligence be discoverable at the time of the occurrence of the incident which gave rise to the action, suit shall be commenced within three (3) years of the time that the act or acts of the malpractice should, in the exercise of reasonable diligence, have been discovered."
Thus, there is a three-year limitations period for medical negligence actions unless the facts give rise to the applicability of the discovery rule embodied in subsection (2). The mere fact that this statute does not expressly require a party to allege in the complaint that he or she is invoking the discovery rule is of no consequence; the time that the negligence allegedly occurred is a material allegation in the complaint that is subject to Rule 12(b)(6) scrutiny. We are of the opinion that the hearing justice appropriately dismissed the complaint, which on its face plainly was barred by the statute of limitations.

Motion to Amend
Barrette next asserts that the hearing justice committed an abuse of discretion in denying her motion to amend the complaint. We respectfully disagree.
Rule 15(a) of the Superior Court Rules of Civil Procedure provides in pertinent part:
"A party may amend the party's pleading once as a matter of course at any time before a responsive pleading is served * * *. Otherwise a party may amend the party's pleading only by leave of court or by written consent of the adverse party; and leave shall be freely given when justice so requires."
The plaintiffs argument is twofold. First, she contends that Rule 15(a) permits her to amend the complaint without leave of court because defendant had not filed a responsive pleadingthat is, an answer. Next, she argues that the hearing justice's denial of her motion to amend was arbitrary because she was not required by Rule 15(a) to append the amended complaint to her motion.
Although Rule 15(a) permits a party to amend a pleading "once as a matter of course" before the opposing party serves a responsive pleading, this provision is of no assistance to plaintiff because, at the time she moved to amend, the hearing justice already had granted the motion to dismiss and entered an order that dismissed the complaint.[2] Professor Kent explains:
"The service by a defendant of a motion to dismiss the complaint for failure to state a claim upon which relief can be *1236 granted does not terminate the plaintiffs right to amend as of course, for a motion is not a `responsive pleading,' as that term is defined in Rule 7(a). However, the granting of a motion to dismiss does end the right to amend as of course, and thereafter amendment is by leave of court." Kent, R.I. Civ. Prac. § 15.2 (2006).
We are satisfied that after the motion to dismiss was granted, plaintiff was required to obtain leave of court to amend her complaint. Therefore, her motion to amend was subject to the discretion of the hearing justice.
It is well established that leave of court to amend a pleading, under Rule 15(a), "shall be freely given when justice so requires," and that a hearing justice routinely should allow a party to amend his or her pleading. See Medeiros v. Cornwall, 911 A.2d 251, 253 (R.I.2006) (citing Serra v. Ford Motor Credit Co., 463 A.2d 142, 150 (R.I.1983)). However, the decision to grant or deny a motion to amend a complaint is within the sound discretion of the hearing justice, and this Court will not disturb that ruling unless the hearing justice committed an abuse of discretion. Id. at 254.
In this case, the hearing justice noted that plaintiff had failed to append an amended complaint setting forth the factual underpinnings that would put defendant on notice that the discovery rule was being invoked. In response, the following colloquy occurred:
"[PLAINTIFF'S COUNSEL]: Your Honor, we do have a letter from me to the treating physician at the time. She treated with seven different physicians, and it was the seventh physician, I sent a letter to him when we were settling the underlying personal injury case, which is not part of this action, this is a medical malpractice case, stating that while I was settling that I noticed there was a seven-month period during which the fracture was not healed and he continued treating it, would that amount to malpractice? That would be appended to amend [the] complaint and that would show that until that point in time, which was September 2003, we had no idea.
"THE COURT: Sorry, counselor. We're going to need a little bit more than your letter. The question is whether the alleged malpractice could have been discovered upon reasonable inquiry, and I haven't heard anything yet to tell me that you're going to be offering specific facts that are responsive to that question. So, this is really becoming an exercise in futility." (Emphases added.)
Because we are satisfied that plaintiff failed to articulate how the discovery rule could save her claim from the three-year period of limitations, we need not decide whether Rule 15(a) requires that a party attach the proposed amendment to the motion to amend. At bottom, counsel's argument to the hearing justice that he wrote to plaintiff's physician inquiring if malpractice occurred, without more, is an inadequate ground upon which to invoke the discovery rule. Although we are mindful of the general rule that ordinarily a plaintiff should have his or her day in court, we are hard-pressed to conclude that the hearing justice abused her discretion when she denied plaintiff's eleventh-hour and insufficiently explicit motion to amend the complaint.

Conclusion
For the reasons articulated in this opinion, we affirm the judgment of the Superior Court that dismissed the complaint. *1237 The record may be remanded to the Superior Court.
NOTES
[1]  The plaintiff filed a notice of appeal on February 12, 2007, after the hearing justice orally granted defendant's motion to dismiss the complaint and before the entry of final judgment. This Court treats appeals filed before the entry of final judgment as timely. Merrimack Mutual Fire Insurance Co. v. Dufault, 958 A.2d 620, 623 n. 4 (R.I.2008).
[2]  The plaintiff asserts on appeal that counsel orally moved to amend her complaint at the hearing on defendant's motion to dismiss, before defendant's motion actually was granted. Our careful review of the record, however, does not support this contention.
