[rspec-devel] Simplifying Behaviour in Rspec

Dan North dan at tastapod.com
Wed Jul 25 18:15:00 EDT 2007

+1 from someone who's about to dive into rspec's internals and see how 
much he can reuse in rbehave :)

Simple is good.

David Chelimsky wrote:
> On 7/25/07, Brian Takita <brian.takita at gmail.com> wrote:
>> 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.
>> BehaviourEval.derive_execution_context_class_from_behaviour_superclass
>> 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.
> FYI - Brian and I have discussed this a bit. The only users this might
> affect are those who've written extensions that extend or talk
> directly to Behaviour or BehaviourEval and anyone who is using the
> "inherit" method in examples. My sense is that this should be a VERY
> limited group, if any at all. If you are in this group, we need to
> hear from you.
> The benefits of this change would be enormous, because it would
> greatly simplify RSpec's internals, making it much easier to
> modify/maintain.
> +1 (at least)
> David
>> Thank you,
>> Brian
>> _______________________________________________
>> rspec-devel mailing list
>> rspec-devel at rubyforge.org
>> http://rubyforge.org/mailman/listinfo/rspec-devel
> _______________________________________________
> rspec-devel mailing list
> rspec-devel at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/rspec-devel/attachments/20070725/f8eb2869/attachment.html 

More information about the rspec-devel mailing list