[rspec-devel] duplication of rails logic

David Chelimsky dchelimsky at gmail.com
Tue Oct 3 19:48:40 EDT 2006

On 10/3/06, aslak hellesoy <aslak.hellesoy at gmail.com> wrote:
> hi folks,
> (especially brian, lachie and david who have spent most time in rspec on rails)
> my memory might be wrong here, but after brian implemented inherit and
> include in rspec core i thought we were able to get rid of a lot of
> the rails-setup code from rspec on rails (the code that sets up test
> requests, response, session and fixtures).
> looking at trunk i see that this code is actually now in two places -
> controller_mixin.rb and rspec_on_rails.rb (twice)
> on the stubbing branch this setup code looks like it's only in one
> place - context_eval.rb, which is better. it's no longer duplicated in
> our own codebase.
> but my question remains: do we really need to set up these objects in
> rspec at all? is my memory wrong when i'm saying that we once had none
> of this code - that the fact that we inherit from Test::Unit::TestCase
> we could get all of this setup code for free from rails'
> Test::Unit::TestCase extensions and not have to do this ourselves?

Assuming that this all lines up syntactically, we should definitely
get rid of what we're already inheriting from Test::Unit.

For tonight and tomorrow AM I'm focused on merging stubbing into the
trunk. I may have time after that to look at this.


More information about the rspec-devel mailing list