If you look at Ryan's cast number 71 he uses any_instance to stub out valid? on active record - this allows you to make sure, for example, to just go to the behaviour of the controller and use stuff like assigns[:fred].value == 'whatever'.
I'm really struggling with overriding new and returning a prebuilt object because I can't check the low-level assign on a multi-model controller. Yeah, ok, I can say assigns[:claim].should == @new_claim But I wanted to check the fields in the claim and the address that belongs to it are all being hit. Can't face learning mocha - no time right now. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

