fixed typo around dynamically adding attribute accessors, test passes
Signed-off-by: Nick Quaranto <nick@quaran.to>
This commit is contained in:
parent
0de21a7027
commit
48b61d0545
|
@ -10,7 +10,7 @@ class Factory
|
||||||
end
|
end
|
||||||
|
|
||||||
def set(attribute, value)
|
def set(attribute, value)
|
||||||
unless @mock.respond_to?("attribute=")
|
unless @mock.respond_to?("#{attribute}=")
|
||||||
class << @mock; self end.send(:attr_accessor, attribute)
|
class << @mock; self end.send(:attr_accessor, attribute)
|
||||||
end
|
end
|
||||||
@mock.send("#{attribute}=", value)
|
@mock.send("#{attribute}=", value)
|
||||||
|
|
Loading…
Reference in New Issue