[rspec-users] describe scope
aslak.hellesoy at gmail.com
Wed Nov 21 09:14:12 EST 2007
On 11/21/07, Mark Van De Vyver <mvyver at gmail.com> wrote:
> Googling 'RSpec describe scope' didn't yield much, so apologies if
> this question has been dealt with.
> It seem well known that a ruby class is 'visible' between describes,
> and if this is a problem then you should use some counter as prefix or
> 'class Item_001; ... end'
> Is there any work underway, or sheduled release where classes will
> exist only in the scope they are defined?
> Writing spec's for Og is where this becomes an issue because Og will
> grab _all_ manageble objects it can 'see'... all sorts of PITA can
try something like this:
@la_classe = Class.new(the_superclass)
# or if you need to reload the class
# undefine the class (don't remember off the top of my head - #undef
> Thanks for all the great work, T/BDD definitely is a brilliant way to
> work, and RSpec makes it painless, esp for us amatuers :)
> rspec-users mailing list
> rspec-users at rubyforge.org
More information about the rspec-users