From 7b70d44852a4124e8211c0b4fd38419dae651aa3 Mon Sep 17 00:00:00 2001 From: guilherme silveira & cecilia fernandes Date: Sun, 31 Oct 2010 16:41:55 -0200 Subject: [PATCH] preloading scenarios --- lib/restfulie/client/mikyung/core.rb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/restfulie/client/mikyung/core.rb b/lib/restfulie/client/mikyung/core.rb index cfc834a5..7058e4ae 100644 --- a/lib/restfulie/client/mikyung/core.rb +++ b/lib/restfulie/client/mikyung/core.rb @@ -42,6 +42,11 @@ def accepts(accepts) # keeps changing from a steady state to another until its goal has been achieved def run + + # load the steps and scenario + @goal.steps + @goal.scenario + if @start.kind_of? String client = Restfulie.at(@start) client = client.follow if @follow @@ -52,10 +57,6 @@ def run @start = current = @goal.class.get_restfulie.get end - # load the steps and scenario - @goal.steps - @goal.scenario - while(!@goal.completed?(current)) current = @walker.move(@goal, current, self) end