The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
testing named scopes

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Mike Gaffney

Posts: 34
Nickname: gaffo
Registered: Dec, 2008

Mike Gaffney is a lead Ruby and Java developer at Asynchrony Solutions
testing named scopes Posted: Dec 22, 2008 2:09 PM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Mike Gaffney.
Original Post: testing named scopes
Feed Title: confabulus
Feed URL: http://blog.confabulus.com/feed/
Feed Description: rails, coding, and the goings on at confabulus
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Mike Gaffney
Latest Posts From confabulus

Advertisement
Named scopes are a nice feature that came out in rails 2.1, however, testing them is not very obvious. Say we have a named scope in our member object which looks like this: class Member < ActiveRecord::Base named_scope :active, {:conditions => {:status => Member::STATUS_ACTIVE}} end There are 2 things we need to do to test them. First would [...]

Read: testing named scopes

Topic: hiding production database info from source control with capistrano Previous Topic   Next Topic Topic: I'm not moving from Textmate to Emacs or Vim

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use