Displaying 3 results from an estimated 3 matches for "recently_activ".
2008 May 02
4
spec''ing calls to super (or other Ruby keywords)
Hi there,
How does one spec an invocation of a Ruby keyword, such as super in this
case?
class User < ActiveResource::Base
# faking the ActiveRecord before/after_save observers
def save
super
UserMailer.deliver_activation(self) if recently_activated?
end
end
Does the solution look anything like the following?
describe User do
describe ''#save'' do
it "should call save on the parent class" do
# something.should_receive(:something)
@user.save
end
end
end
Any thoughts?
Thanks much,
Matt...
2007 Aug 30
8
experimental rails story adapter in trunk
For those of you interested in getting a jump on learning about and
using the new Story Runner in a Rails app, I''ve added an experimental
Rails-Story adapter to trunk.
You can see how to use it here:
http://pastie.caboo.se/92320
This is PURELY EXPERIMENTAL, however it actually works and will likely
not change much in the way that it does work.
Happy hacking!
David
2007 Nov 12
1
help debugging ActionMailer with restful_authentication?
...uot;patelc75" ,
:password => "irdiktanic" ,
}
Here''s the delivery code:
class UserObserver < ActiveRecord::Observer
def after_create(user)
UserMailer.deliver_signup_notification(user)
end
def after_save(user)
UserMailer.deliver_activation(user) if user.recently_activated?
end
end
Thanks!
Chirag
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To u...