search for: process_order

Displaying 3 results from an estimated 3 matches for "process_order".

2006 Oct 13
6
If I stub do I have to mock as well?
Hi, I''m new to mocha and stubba but eager to learn. I have a rails functional test in which I would like to stub an instance method of particular class to always return true. I tried the following: def test_post_checkout Order.any_instance.stubs(:successful?).returns(true) post :checkout assert_response :redirect assert_equal "Checkout was successful.",
2008 May 03
2
backgroundrb / actionmailer / sendmail
Hello, I''m trying to send emails from a backgroundrb worker and the email doesn''t send. I get no log messages in the sendmail log or the system log, nothing in the backgroundrb logs at all, nothing in the production log. Below is my code for each component worker: class QuizReviewerWorker < BackgrounDRb::MetaWorker set_worker_name :quiz_review_sender def create(args =
2007 Nov 26
6
Model setters, override attribute=(attribute)?
...m to work. Am I missing a better way to achieve this? I had also considered using a before_save :set_customer_type kind of thing but felt the code may loose a little readability. I''m coming from a Java world with protected attributes, accessed via domain influence methods, .set_customer, .process_order etc... I wasn''t really sure how best to interpret this into ruby on rails models. class Basket < ActiveRecord::Base belongs_to :customer_type belongs_to :customer def customer=(_customer) write_attribute(:customer, _customer) customer_type = _customer.customer_type unle...