On Wed, Apr 06, 2011 at 07:42:03PM -0700, Pedro Teixeira wrote:
>
> I managed to realized that's happening only my specs.. and it's due to
> the fact that I mock Time.now :p
> To the last raw value is actually in the past.. or could be in the
> future.
>
> Not sure how to fix it for my tests to run... any ideas? trying to
> reset state for the engine contest. What's the best way to configure a
> new class for 's_wfidgen'?
Hello Pedro,
you could monkeypatch WfidGenerate#get_raw or #generate when spec'ing.
If you want to pass your own class, you can do it at storage initialization :
---8<---
engine =
Ruote::Engine.new(
Ruote::Worker.new(
Ruote::FsStorage.new(
dir,
's_wfidgen' => [ 'path/to/file.rb', 'Pedro::WfidGenerator' ])))
--->8---
Best regards,
--
John Mettraux - http://jmettraux.wordpress.com
--
you received this message because you are subscribed to the "ruote users" group.
to post : send email to [email protected]
to unsubscribe : send email to [email protected]
more options : http://groups.google.com/group/openwferu-users?hl=en