M
Marcus Lindemann
Hi,
I'm somewhat new to ruby. and I want to unit test my methods. Since I
compose my public methods from private ones, I start writing and also
test those first. From the web I found that testing of private methods
is possible through
class Foo
def foobar
bar
end
private
def bar # <-- takes no params
"bar"
end
def bla(aName)
aName
end
end
x = Foo.new
x.sendbar)
However, when applying this to method bla, I don't have any idea on how
to pass any argument to bla. Can someone help me here?
Thanks
Marcus
I'm somewhat new to ruby. and I want to unit test my methods. Since I
compose my public methods from private ones, I start writing and also
test those first. From the web I found that testing of private methods
is possible through
class Foo
def foobar
bar
end
private
def bar # <-- takes no params
"bar"
end
def bla(aName)
aName
end
end
x = Foo.new
x.sendbar)
However, when applying this to method bla, I don't have any idea on how
to pass any argument to bla. Can someone help me here?
Thanks
Marcus