[Nitro] OG [PATCH RFC]: Og test helper - Cleaner setup of defaults and more flexible

Mark Van De Vyver mvyver at gmail.com
Thu Sep 6 22:08:22 EDT 2007


Hi Devs,
A RFC on some changes to the Og test helper that shouldn't break
anyones' existing tests - famous last words :)

Current syntax should leave you with the current behavior.

Changes:
 - Og setup default options are separated out and accessible.
 - config or config and start supported.  Default is the current
config and start.

RFC:
1) In the config only case: should `Aspects.setup` be called before
config hash is returned?
Currently it is called after, so is only activated when OG has been
started..... At this point I have no idea what Aspects does.
2) For clarity maybe the `default_options` accessor should just be
`options` since we don't actualy chage OGs default options - those are
hardcocded in og.rb?

Usage:
a) OgSpecHelper.setup  <the current default behavior>

b) OgSpecHelper.setup(:config_only=>true) <config and return the Og
options hash>

c) OgSpecHelper.default_options = {.....} <Change Og options, config and start>
OgSpecHelper.setup

d) OgSpecHelper.default_options = {.....} <Change Og defaults, config only>
OgSpecHelper.setup(:config_only=>true)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mvdv-20070907-1-rfc.patch
Type: text/x-patch
Size: 62970 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/nitro-general/attachments/20070907/d996bcf8/attachment-0001.bin 


More information about the Nitro-general mailing list