Inserting text to file, sed and variable not acting right

I want to put text stored in a variable into a file on the 7th line. I'm having trouble with this line:

sed '7i\'$text'' $file

It works perfectly for a single word, but fails if there are two words because of the space. I've tried several forms of quoting and this is the only one that (semi)works. I've been using "echo $text" after this line while testing to ensure there's nothing wrong with the text in the variable.

sed "7i\\
$text" $file

Seems to be working. Thanks!