Displaying 1 result from an estimated 1 matches for "persist_herd".
2011 Jul 11
2
Can't get this Rspec test to pass
...and I''m finding it very difficult to
mock specific objects.
In this test, I have a before block setup as such:
[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)...