I'm following a course about electrical engineering at university and I have a question about an example the professor made: he said that if we were to take an ideal voltage generator and connect it in series with a resistor, the voltage measured between the free end of the resistor and the free end of the generator would be V = E + RI where E is the voltage imposed by the generator, R is the resistance of the resistor and I the current that flows trough the resistor.
What I don't understand is the reason why when I try this at home with a 220ohm resistor and a 9V battery, the voltage V is equal to E with the resistor having no effect on the voltage but only on the current the battery manages to output. Why does this happen?