Yes, the two wires going from the signal generator to the scope are extended to connect to the 2 wires on the motor. That's what it means but I suspect it is intended for small inductors, not some motor.
There are other methods:
https://electronics.stackexchange.com/questions/182116/whats-the-easy-way-to-measure-a-dc-hobby-motors-inductance
Google has more...
Yes, I came across this but I am not sure the following:
"in series with a resistor, and put the scope across the resistor. Adjust the resistor value"
First the author wrote in series with "a" resistor. What value?
Then, the author wrote "adjust the resistor value". Isn't the resistor value fixed?
Does that mean a potentiometer that one could adjust the resistor value? What value should I get?
The author is talking about testing small inductors, not motors. Why would anybody care about the inductance at 20 kHz in a motor? 1 kHz, maybe but 20 kHz seems over the top.
Second, is the inductance constant whether the motor is stalled or running full speed? I doubt it. We haven't discussed how big the motor is but if it is very large, the signal generator may not be very happy with the current draw. So, maybe you should use something like 50 Ohms, assuming that the motor looks like 0 Ohms and the generator should be able to drive 50 Ohms.
You're only looking for phase shift and by measuring across the resistor, you are getting the current waveform. To me, that means that one side of the resistor is ground and that's where both scope channel grounds connect. Channel 1 probe on the top of the resistor (current waveform) and Channel 2 probe on the ungrounded signal generator output at the motor (voltage waveform). Measure the phase angle.