[Git][noosfero/noosfero][api] 4 commits: Give the right certifiers list
Antonio Terceiro
terceiro at colivre.coop.br
Mon Jun 29 16:31:04 BRT 2015
On Mon, Jun 29, 2015 at 04:06:24PM -0300, Antonio Terceiro wrote:
> On Mon, Jun 29, 2015 at 06:42:51PM +0000, Rodrigo Souto wrote:
> > =====================================
> > test/test_helper.rb
> > =====================================
> > --- a/test/test_helper.rb
> > +++ b/test/test_helper.rb
> > @@ -270,6 +270,19 @@ module NoosferoTestHelper
> > ''
> > end
> >
> > + # make a string from ordered hash to simplify tests
> > + def h2s(value)
> > + case value
> > + when Hash, HashWithIndifferentAccess
> > + '{'+ value.stringify_keys.to_a.sort{|a,b|a[0]<=>b[0]}.map{ |k,v| k+':'+h2s(v) }.join(',') +'}'
> > + when Array
> > + '['+ value.map{|i|h2s(i)}.join(',') +']'
> > + when NilClass
> > + '<nil>'
> > + else value.to_s
> > + end
> > + end
> > +
> > end
>
> this is not used anywhere in either this commit, or in the entire
> branch. why is it needed?
For completeness, I expect any test written using this to be very
fragile and a waste of time.
--
Antonio Terceiro <terceiro at colivre.coop.br>
Colivre - Cooperativa de Tecnologias Livres
http://www.colivre.coop.br/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20150629/a65bf3d8/attachment.pgp>
More information about the Noosfero-dev
mailing list