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.
Thanks David, 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. HR -- Posted via http://www.ruby-forum.com/. _______________________________________________ rspec-users mailing list [email protected] http://rubyforge.org/mailman/listinfo/rspec-users
