egervari
2011-May-31 18:33 UTC
How do you test a module that extends ActiveSupport::Concern?
I have a module that extends ActiveSupport::Concern. Here is the
`included` block:
included do
after_save :save_tags
has_many :taggings, :as => :taggable
has_many :tags, :through => :taggings
end
How can I stub out these calls? I have tried a few ways, but Ruby
complains that these methods don''t exist when I try and test the
module in isolation.
Thanks!
--
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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.
Reasonably Related Threads
- has_many :through, collection<<(object) and duplicates.
- How to use polymorphic in a beautiful way in such a case?
- Per activerecord object callbacks (aka: should I have gone to bed hours ago?)
- Problem with has_many :through, :uniq => true with polymorph
- polymorphic,has_many through can not work?
