[rspec-users] Where is current_user?
lists at ruby-forum.com
Mon Oct 20 10:09:46 EDT 2008
David Chelimsky wrote:
> When things are hard to test they are hard to maintain, so
> maintainability requires testability. When a simple change makes
> something easier to test, that change brings a lot of value. That's
> the spirit of rspec, BDD and even TDD.
I am new to rspec and am enjoying the interchange between build a test
then build the code. In this case I'm late to the party. This
particular setup for @current_user makes sense to me but I understand
your point about maintainability.
In trying to understand what rspec is doing, my thinking was that since
MotionsController is a subclass of ApplicationController any instance
variable set in ApplicationController was available to
MotionsController. I think you are telling me that rspec doesn't invoke
this. So I need to think about the implications here.
Yes, I want the advantages of rspec and having maintainable code.
Posted via http://www.ruby-forum.com/.
More information about the rspec-users