Clearing TOPLEVEL_BINDING for reuse

Is there anyway to delete all the local and instance variables in a
Binding?

I’ve been working on a test framework and ideally I’d like the tests
to run at the toplevel rather than within the scope of some class. But
to do this I need to clear out the variables between each test script.

On 2010-06-05 11:40:25 -0700, Intransition said:

Is there anyway to delete all the local and instance variables in a
Binding?

I’ve been working on a test framework and ideally I’d like the tests
to run at the toplevel rather than within the scope of some class. But
to do this I need to clear out the variables between each test script.

Binding objects are not mutable, nor would I suggest this as an
implementation strategy.

Rein H.

http://reinh.com

On Jun 5, 3:05 pm, Rein H. [email protected] wrote:

implementation strategy.
Any suggestions?

On 2010-06-05 17:09:06 -0700, Intransition said:

Binding objects are not mutable, nor would I suggest this as an
implementation strategy.

Any suggestions?

There are at least 8 Ruby testing frameworks (that I’m aware of). I
would recommend examining existing implementations. Nothing I could
suggest in this space would be as comprehensive or accurate as the open
source prior art available to you.

On 2010-06-05 20:52:01 -0700, Intransition said:

After all, what is TOPLEVEL anyway?

Funny how things can seem so complicated, but turn out the be so
incredibly simple.

Thanks for the help.

Or that.

On Jun 5, 8:20 pm, Rein H. [email protected] wrote:

There are at least 8 Ruby testing frameworks (that I’m aware of). I
would recommend examining existing implementations. Nothing I could
suggest in this space would be as comprehensive or accurate as the open
source prior art available to you.

Actually it turned out to be quite simple:

Object.new

After all, what is TOPLEVEL anyway?

Funny how things can seem so complicated, but turn out the be so
incredibly simple.

Thanks for the help.