[rspec-devel] Simplifying Behaviour in Rspec

Brian Takita brian.takita at gmail.com
Wed Jul 25 16:33:07 EDT 2007

I remember that much of Behaviour's complexity put in place to reuse
Rails fixtures.
That includes the inherit method and the dynamic class builder.

Since we now call Test::Unit's setup and teardown in before and after
blocks, we can compose in a Test::Unit::TestCase instance to call
setup and teardown on.
This would make the dynamic class inherit from Test::Unit unnecessary.

In fact, I don't think there is any other reason to use BehaviorEval
to create a Dynamic class.
Since that is the case, we can probably use class and instance methods
for Behaviour and remove BehaviourEval from the loop.
This would simplify things.

What do you all think about this?
Are there extensions out there that this would break?

This would be a major change to Rspec's internals, so please speak up.

Thank you,

More information about the rspec-devel mailing list