I have a class that has the following initialization method.
def initialize(my_var) @my_var = my_var end
and I want to test a method that then does something with @my_var
def split @my_var.split(",") end
how do I change @my_var before testing that it returns an array correctly?
Is this possible if you do not have access for @my_var ?
ruby rspec stubbing
Joseph Le Brech
source share