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
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to