> This is not working for the reason that I think you think it's > working. and_return is not an expectation - it is a command telling > @teacher to return @new_course when it receives :build. You have to > define @new_course in the spec.
I did the following: http://gist.github.com/306521 and it works as expected. make_unsaved is a class method added by Machinist. What is the scope of instance variables defined in a before(:each) block? They are available to all it-blocks, yet changes made to an instance variable in one it-block are reverted before the next one, correct? Best, Nickolay _______________________________________________ rspec-users mailing list [email protected] http://rubyforge.org/mailman/listinfo/rspec-users
