I would like to run cable for an in-wall heater but not actually connect to the heater right now, I just want to get the cable run and connected to the sub-panel (along with all the other cables that we are running). That way, I don't have to bring in the electrician again later on. So can I run cable from a sub-panel to a junction box and put wire nuts on the three wires and leave the junction box accessible - covered by a box cover but not covered with dry wall? The work will be in a room that we will be renovating in the next couple of months. Does NEC allow this kind of thing?
Putting a box in at the end of the future run, terminating the wires in nuts, and putting a cover on it is standard practice for a "future expansion" outlet of any sort -- putting a label on the cover indicating what it's intended for is a nice touch, but by no means needed by Code. In fact, you cannot "bury" the box behind the drywall -- it must remain accessible for later use/servicing.
I actually agree with someone in the comments. Running wires to a location and leaving them "live, but connected to nothing" is inappropriate. It would never be allowed in conduit; you are expected to either pull useless wires or put them to a use.
In cable-in-wall construction, it is allowed to set unused cables due to the impracticability of accessing the walls later. However they should either be disconnected at both ends, or connected at both ends.
I suggest you put the wires to a use. Wire them in all respects for the future application, then fit the appropriate NEMA receptacle for the circuit run --
- for a 15A/240V (no neutral) circuit, NEMA 6-15
- for a 20A/240V (no neutral) circuit, one or more NEMA 6-20 or two or more (i.e. duplex) NEMA 6-15
- for a 30A/240V (no neutral) circuit, NEMA 6-30
- for a 15A, 120/240V circuit, NEMA 6-15 or 14-15, or if AFCI/GFCI are not required here, a common NEMA 5-15 with the hots split.
- for a 20A, 120/240V circuit, NEMA 6-20 or 14-20, or if if no A/GFCI, then a NEMA 5-20 with hots split.
These would be generally useless (except the 5-15 or 5-20) but would justify leaving the circuit wired and hot. If an inspector asks, just say "homebrewing".