0
基本上我想确保method_1和method_2应该从过程方法中调用。如何在下面的代码中为流程方法编写rspec?
def process
begin
method_1 if some_condition
method_2 if some_condition
self.update_attribute(:status,DONE)
rescue=>e
self.update_attribute(:status,ERROR)
p e
end
end
def method_1
#some code
end
def method_2
#some code
end
谢谢山姆,它为我工作。 – vivekporwal04 2013-03-15 06:08:16
没问题。不要忘记标记答案是正确的:) – Sam 2013-03-15 12:04:51