On Tue, Dec 07, 2010 at 07:24:21PM -0800, Copper Hill wrote:
> 
> I run test for ruote with rcov, and got the coverage report below,
> order by COV rate ascendantly.
> 
> then I wrote three test cases to cover pretty.rb/misc.rb and
> fs_storage.rb, with the total coverage rise to 93.8% from 92.0%.
> Would it be integrated into offical release?

Hello Copper, welcome to the ruote mailing list,

well it sounds interesting, where is the code ?

> |lib/ruote/log/pretty.rb                             |   137 |    61
> |   8.2% |
>
> (...)
>
> PS: A little suggestion to modify ft_2_errors.rb.
> 
> diff --git a/ruote-2.1.11/test/functional/ft_2_errors.rb b/
> ruote-2.1.11/test/functional/ft_2_errors.rb
> index bb7df7a..ce225fd 100644
> --- a/ruote-2.1.11/test/functional/ft_2_errors.rb
> +++ b/ruote-2.1.11/test/functional/ft_2_errors.rb
> @@ -90,7 +90,7 @@ class FtErrorsTest < Test::Unit::TestCase
> 
>      err1 = ps.errors.first
> 
> -    assert_not_equal err.at, err1.at
> +    assert_not_equal err.id, err1.id
>        # not the same error
> 
>      assert_equal 1, @engine.storage.get_many('errors').size

Please consider (run) this code :

---8<---
require 'rubygems'
require 'ruote'

engine = Ruote::Engine.new(Ruote::Worker.new(Ruote::HashStorage.new))

pdef = Ruote.process_definition do
  error "something went wrong"
end

wfid = engine.launch(pdef)

engine.wait_for(wfid)
  # wait for the process to hit the error

err0 = engine.process(wfid).errors.first
err1 = engine.process(wfid).errors.first

p err0.id
p err0.object_id
puts
p err1.id
p err1.object_id
puts
p err0.id == err1.id
--->8---

err0 and err1 are conceptually the same process error, but they are not the 
same instance of ProcessError.

So

> +    assert_not_equal err.id, err1.id

is always a valid assertion.

> -    assert_not_equal err.at, err1.at

is the right assertion.


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

Reply via email to