Displaying 1 result from an estimated 1 matches for "herd_ration".
2011 Jul 11
2
Can't get this Rspec test to pass
...uch:
[code]
before do
setup_controller_for_warden
controller.session[:operation_id] = 1
@operator = Factory :operator
sign_in :operator, @operator
@persist_herd = Herd.new
@persist_herd.operation_id = 1;
@persist_herd.herd_name = ''Persisted Herd
(herd_rations_controller_spec)''
@persist_herd.save!
end
describe "GET new" do
it "assigns a new herd_ration as @herd_ration" do
HerdRation.stub(:new){ mock_herd_ration }
Herd.stub(:find).with(1) { @persistant_herd }
get :new, :herd_id => 1...