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.
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.
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.
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.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.