[rspec-devel] duplication of rails logic

aslak hellesoy aslak.hellesoy at gmail.com
Tue Oct 3 17:47:09 EDT 2006

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?


More information about the rspec-devel mailing list