#### NORTH CAROLINA RAILROAD COMPANY v. FERGUSON BUILDERS SUPPLY, INC., a Corporation; MOREHEAD BUILDERS SUPPLY CO., a Corporation; BECKER BUILDING SUPPLY CO., a Corporation; PINE STATE CREAMERY COMPANY, a Corporation, MART L. BELL AND SONS PAVING CONTRACTORS, a Corporation, MART L. BELL, SR. and his wife, MARY G. BELL; WADE & LEWIS, INC., a Corporation, WADE & LEWIS HEATING & AIR CONDITIONING, INC., a Corporation, PAUL W. LEWIS and his wife, SANDRA S. LEWIS; WACHOVIA BANK & TRUST COMPANY, N.A., Executor of the Estate of George R. Ballou, WACHOVIA BANK & TRUST COMPANY, N.A., Trustee, MILDRED H. BALLOU; HOBERT KELLY and his wife, PATRICIA M. KELLY; JOHN HAMAD; BOLTON CORPORATION, a Corporation

No. 903SC768

(Filed 20 August 1991)

1. Rules of Civil Procedure § 12.1 (NCI3d)— voluntary dismissal-two dismissal rule — motion to dismiss — treated as summary judgment

The trial court erred by dismissing plaintiff’s complaint under N.C.G.S. § 1A-1, Rule 12(b)(6) where defendants raised the two dismissal rule of N.C.G.S. § 1A-1, Rule 41(a)(1). In order to conclude that the action was barred by the two dismissal rule, the court necessarily had to consider both the complaints filed in the prior actions and the notices of dismissal. Complaints filed in prior actions are matters outside the pleadings *769and the motion should be treated as a motion for summary judgment.

Am Jur 2d, Dismissal, Discontinuance, and Nonsuit §§ 23, 73.

2. Rules of Civil Procedure § 41.2 (NCI3d)— two dismissal rule— second dismissal by court order — not applicable

The trial court erred by dismissing plaintiffs complaint under the two dismissal rule of N.C.G.S. § 1A-1, Rule 41(a)(1) where the second dismissal was by order of the judge, not by the filing of a notice of voluntary dismissal.

Am Jur 2d, Dismissal, Discontinuance, and Nonsuit § 76.

What dismissals preclude a further suit, under federal and state rules regarding two dismissals. 65 ALR2d 642.

APPEAL by plaintiff from Order entered 16 April 1990 in CARTERET County Superior Court by Judge James D. Llewellyn. Heard in the Court of Appeals 12 February 1991.

Wheatly, Wheatly, Nobles, Weeks & Wainwright, P.A., by J. Christy Maroules, for plaintiff-appellant.

Bennett, McConkey, Thompson, Marquardt & Wallace, P.A., by Thomas S. Bennett and Samuel A. McConkey, Jr., for defendants-appellees.

WYNN, Judge.

On 18 December 1980, the Atlantic and East Carolina Railway Company (hereinafter “A&EC”) instituted a- civil action against the above-named defendants or their predecessors in title. The complaint alleged, inter alia, that A&EC, as a lessee, was in possession of certain lands upon which the defendants were continuously trespassing. The complaint also alleged that Atlantic and North Carolina Railroad Company (hereinafter “A&NC”) was the owner of the land; however, A&NC was not a party to the action. On the day the case came on for trial, 24 June 1985, A&EC filed a notice of voluntary dismissal without prejudice, pursuant to Rule 41(a)(1) of the North Carolina Rules of Civil Procedure.

On 23 June 1986, A&EC instituted another action against the above-named defendants or their predecessors in title. The com*770plaint made the same allegations and claims for relief as did A&EC’s 1980 action, including the fact that A&EC was the lessee in possession of lands owned by A&NC. Again, as in the previous action, A&NC was not named as a party; however, pursuant to an order of the court, A&NC was made to intervene in the action. Thereafter, A&NC appeared in the action as an intervening plaintiff.

On 30 November 1988, pursuant to a motion made by A&NC, in which A&EC joined, the court entered an order dismissing this second action without prejudice pursuant to Rule 41(a)(2) of the North Carolina Rules of Civil Procedure.

On 27 November 1989, A&EC and A&NC, as joint plaintiffs, applied to the Carteret County Clerk of Superior Court for an Order Extending Time To File Complaint. The Clerk granted the request and issued an order on 27 November 1989 which extended the time for filing to 18 December 1989. However, A&EC and A&NC did not subsequently file a complaint; instead, North Carolina Railroad Company (hereinafter “NCRC”), the plaintiff in this case, filed the present action on 27 November 1989 against the above-named defendants.

NCRC’s complaint, like A&EC’s 1980 complaint and the joint claims of A&EC and A&NC in 1986, alleged, inter alia, a continuing trespass on the part of the defendants. The complaint also alleged that NCRC’s existence was the result of a merger with A&NC and that NCRC was the current owner of the disputed land.

In response to NCRC’s complaint, the defendants asserted contrarily that NCRC’s existence was attributable to a merger between A&EC and A&NC and was therefore subject to the two-dismissal rule under Rule 41(a)(1) of the North Carolina Rules of Civil Procedure. The trial court agreed with the defendants’ contention and granted their motion to dismiss. The plaintiff now appeals.

I

[1] NCRC’s sole assignment of error is that the trial court erred in granting the defendants’ Rule 12(b)(6) motion to dismiss the complaint for failure to state a claim upon which relief could be granted.

The purpose of a Rule 12(b)(6) motion is to test the legal sufficiency of the pleading against which the motion is directed. Azzolino v. Dingfelder, 71 N.C. App. 289, 322 S.E.2d 567 (1984), rev’d in *771 part and aff'd in part, 315 N.C. 103, 337 S.E.2d 528 (1985), cert. denied, 479 U.S. 835, 93 L.Ed.2d 75 (1986). A complaint is deemed sufficient to withstand a motion to dismiss under Rule 12(b)(6) where no insurmountable bar to recovery appears on the face of the complaint and the complaint’s allegations give adequate notice of the nature and extent of the claim. Renwick v. News & Observer Publishing Co., 63 N.C. App. 200, 304 S.E.2d 593 (1983), rev’d on other grounds, 310 N.C. 312, 312 S.E.2d 405 (1984).

It should be noted that the complaint in this case does not disclose the fact that its claims for relief were previously asserted in two different actions brought by A&EC; nor does it disclose the fact that both of these actions were voluntarily dismissed. In order for the trial court to have properly reached the conclusion that NCRC’s action was barred by the “two dismissal” rule of Rule 41(a)(1), it necessarily had to consider both of the complaints filed in the prior actions and the notices of dismissal. Notices of voluntary dismissal filed in previous actions have been held to be matters outside the pleadings. Caldwells’ Well Drilling, Inc. v. Moore, 79 N.C. App. 730, 732, 340 S.E.2d 518, 520 (1986). Similarly, we find that complaints filed in prior actions are matters outside the pleadings. But cf. Stanback v. Stanback, 297 N.C. 181, 205, 254 S.E.2d 611, 627 (1979) (holding that where a complaint incorporates by reference, as an exhibit, a complaint filed in a different action, the complaint filed in the different action is not a matter outside the pleadings). Where matters outside the pleadings are received and considered by the court in ruling on a motion to dismiss under Rule 12(b)(6), the motion should be treated as a motion for summary judgment and disposed of in the manner and on the conditions stated in G.S. 1A-1, Rule 56. See Roach v. City of Lenoir, 44 N.C. App. 608, 609, 261 S.E.2d 299, 300 (1980).

[2] Upon considering defendants’ Rule 12(b)(6) motion as a Rule 56 motion for summary judgment, the critical questions for determination on appeal become whether there were any genuine issues of material fact and whether the movant was entitled to judgment as a matter of law. Oliver v. Roberts, 49 N.C. App. 311, 314, 271 S.E.2d 399, 401 (1980), cert. denied, 276 S.E.2d 283 (1981). The plaintiff does not contend that there were genuine issues of material fact in the case sub judice; rather, it contends that the defendants were not entitled to judgment as a matter of law. We agree.

*772At the motions hearing, the defendants asserted that the plaintiff’s complaint was barred by the “two dismissal rule” contained in Rule 41(a)(1) of the Rules of Civil Procedure. N.C. Gen. Stat. § 1A-1, Rule 41 provides, in part, as follows:

(a) Voluntary dismissal; effect thereof.—

> (1) By Plaintiff; by Stipulation.— ... an action or any claim therein may be dismissed by the plaintiff without order of court (i) by filing a notice of dismissal at any time before the plaintiff rests his case, .... Unless otherwise stated in the notice of dismissal . . ., the dismissal is without prejudice, except that a notice of dismissal operates as an adjudication upon the merits when filed by a plaintiff who has once dismissed ... an action based on or including the same claim. If an action commenced within the time prescribed therefor, or any claim therein, is dismissed without prejudice under this subsection, a new action based on the same claim may be commenced within one year after such dismissal . . . .

> (2) By Order of Judge. — Except as provided in subsection (1) of this section, an action or any claim therein shall not be dismissed at the plaintiff’s instance save upon order of the judge and upon such terms and conditions as justice requires. Unless otherwise specified in the order, a dismissal under this subsection is without prejudice. If an action commenced within the time prescribed therefor, or any claim therein, is dismissed without prejudice under this subsection, a new action based on the same claim may be commenced within one year after such dismissal unless the judge shall specify in his order a shorter time.

It has been recognized that when Rule 41(a) is distilled to its essence, three methods by which a civil action may be voluntarily dismissed become apparent. Parrish v. Uzzell, 41 N.C. App. 479, 483, 255 S.E.2d 219, 221 (1979). An action may be voluntarily dismissed (1) by the plaintiff’s filing of a notice of dismissal at any time before he rests his case, (2) by the filing of a stipulation of. dismissal which has been signed by all of the parties appearing in the action, and (3) by order of the judge “upon such terms and conditions as justice requires.” Id. It has also been recognized that unless otherwise specified, a voluntary dismissal effected by any one of the three methods is without prejudice. Id. The only exception to this “without prejudice” rule is that “ ‘a notice of *773dismissal operates as an adjudication upon the merits when filed by a plaintiff who has once dismissed in any court of this or any other state or of the United States, an action based on or including the same claim.’ ” Id.

Applying these principles to the facts before us, we must conclude that the trial court erred in dismissing the plaintiff’s action. We note initially that the record fails to reflect any convincing evidence which tends to show that NCRC’s existence is the result of a merger between A&EC and A&NC. The complaint certainly does not disclose that fact and NCRC has not admitted it. However, even if we were to assume that A&EC and A&NC had merged to form NCRC, we would still be of the opinion that the trial court erred.

While the record discloses that A&EC voluntarily dismissed the same action twice, the second voluntary dismissal, obtained in 1988, was by order of the judge, not by the filing of a notice of voluntary dismissal. This court’s holding in Parrish makes it clear that the second dismissal rule does not apply to make voluntary dismissals by stipulation or by order of court “on the merits,” even when they follow a previously filed notice of voluntary dismissal. Id. Here, the 1988 order granting A&EC a voluntary dismissal expressly stated that the dismissal was without prejudice. Thus, even if A&EC had merged with A&NC to form NCRC, the voluntary dismissal obtained by A&EC in 1988 would not have operated as an adjudication of its claims on the merits under the facts of this case. It follows that NCRC was not precluded from bringing the present action.

II

For the reasons discussed above, we conclude that the trial judge erred in dismissing the plaintiff’s complaint. The trial judge’s order of dismissal is

Reversed.

Judges WELLS and GREENE concur.