search for: generate_valid_web_order

Displaying 1 result from an estimated 1 matches for "generate_valid_web_order".

2007 Nov 13
2
Trouble stubbing a method
...s are made in one method: Order#payment_authorize. This is called from ActiveRecord#validate. So, my thinking was just to stub out Order#payment_authorize. So here is one of my specs: describe Order, "placed via the web" do include OrderSpecHelper before(:each) do @order = generate_valid_web_order @order.should_receive(:payment_authorize) end it do @order.should be_valid end end I''m using a mock for now, just to verify it does get called, once it''s working I''ll change it to a stub. (I want to explicitly test it on another spec) Anyhow, this do...