I have a class which has the following initialise method.
def initialize(my_var)
@my_var = my_var
end
and I want to test the method which then does something to @my_var
def split
@my_var.split(",")
end
how do I change @my_var
before testing that it returns an array properly?
Is this possible without having an accessor for @my_var
?