After looking at the examples provided I'm already seeing me adding a method_missing to the object that prepends "should_" to what I call :)

Just kidding... keep up the good work. Until now I used basic subclassing for inheriting validations while declaring the top class as abstract to deactivate STI. But when things get more complicated, I think ActiveSpec will turn to be a gem. Thank you!

--
Mislav


On 9/20/06, Luke Redpath <[EMAIL PROTECTED]> wrote:

specification :user do
  should_require_presence_of :username, :password
  should_require_confirmation_of :password
end

specification :authenticated_user do
  should_satisfy :user_specification # the above spec
end

specification :foo do
  should_satisfy { |obj| # do something }
end



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/rubyonrails-core
-~----------~----~----~----~------~----~------~--~---

Reply via email to