search for: messageexpectation

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

Did you mean: message_expectation
2008 Mar 05
14
ActiveRecord, spec''ing find has right :order parameter
I''m wanting to write a spec that a model is applying an :order option to a find call, but I don''t want to completely specify all of the find parameters. So I want to write something like this, say in a controller spec User.should_receive(:find).with(:all, hash_with_at_least(:order => ''user.name ASC'')) get ''index'', :sort =>
2011 Jul 27
3
Rspec with ActionMailer and .deliver
I''m in the process of migrating from Rails 2 with rspec 1 to Rails 3 with rspec 2, the process has been going pretty well, however, today I came across an issue that I wanted to share. I have a controller that sends out an email through a mailer. Rails 2 code: CurriculumCommentMailer.deliver_comment_update(@curriculum_comment, "created") Rails 3 code:
2009 Apr 19
19
Controller spec: testing that scope is set
In a Rails controller I set the scope on a model class in an around filter. I have defined expectations on the model classes, and ideally, I would add a further expectation for the scope. Is this already possible in some way? How would I go about adding support a scope expectation? Michael -- Michael Schuerig mailto:michael at schuerig.de http://www.schuerig.de/michael/