Dumb question, do you have required "spec_helper" at the top of the file?
Ken On Tue, May 31, 2011 at 4:03 PM, Chris Habgood <[email protected]> wrote: > Ya, that is not working. The code I gave you I was trying different things > out. > Rails 3.0 > Rspec rspec (2.6.0.rc6) > > On Tue, May 31, 2011 at 14:35, Ken Egervari <[email protected]>wrote: > >> Oh, don't forget the :id in the call to edit >> >> >> before(:each) do >> @food = Food.new >> @food.id = 1 >> end >> >> describe "GET 'edit'" do >> it "should be successful" do >> Food.stub(:find).with("1").and_return(@food) >> >> get :edit, :id => "1" >> >> >> assigns(:food).should == @food >> end >> end >> >> Ken >> >> _______________________________________________ >> rspec-users mailing list >> [email protected] >> http://rubyforge.org/mailman/listinfo/rspec-users >> > > > > -- > *"In matters of style, swim with the current; in matters of principle, > stand like a rock." > Thomas Jefferson > * > > _______________________________________________ > rspec-users mailing list > [email protected] > http://rubyforge.org/mailman/listinfo/rspec-users >
_______________________________________________ rspec-users mailing list [email protected] http://rubyforge.org/mailman/listinfo/rspec-users
