[rspec-users] How do you test a module that extends ActiveSupport::Concern?

Ken Egervari
Tue, 31 May 2011 18:09:14 -0000

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!

Ken
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://rubyforge.org/pipermail/rspec-users/attachments/20110531/f4d09f72/attachment.html>