You forgot to execute your refactoring. Try this
| model className theClass iVarName |
className := #MyClass.
iVarName := 'testIVar'.
model := RBNamespace new classNamed: className; yourself.
theClass := (RBClass existingNamed: className)
model: model;
yourself.
(RBAddInstanceVariableRefactoring
model: model
variable: iVarName
class: theClass) execute.
you may want to add authomatic accession methods (getter and setter) for your new instance variable
(RBCreateAccessorsForVariableRefactoring
model: model
variable: iVarName
class: theClass
classVariable: false) execute