Re: [rspec-users] Mocking problem in controller

2009-10-27 Thread drewB
Thanks! That was very helpful. I did do some searching but didn't come up with that result. On Oct 27, 11:16 am, Ashley Moran wrote: > On Oct 27, 2009, at 3:51 pm, drewB wrote: > > > As you can see, I am not mocking current_user.objectives.create so I > > have to look at assigns[:objective] to

Re: [rspec-users] Mocking problem in controller

2009-10-27 Thread Ashley Moran
On Oct 27, 2009, at 3:51 pm, drewB wrote: As you can see, I am not mocking current_user.objectives.create so I have to look at assigns[:objective] to test that things are working. How would I go about mocking it? Hi Drew A virtually identical question was asked recently. Hopefully the rep

[rspec-users] Mocking problem in controller

2009-10-27 Thread drewB
I am having a lot of trouble figure out how to mock one my controller methods. I was hoping someone might be able to help me. --- Controller: def create @objective = current_user.objectives.create(params[:objective]) end RSpec: it "should create a new objec