Module: Woulda::ActsAsTaggableOnSteroids::Macros

Defined in:
lib/woulda/acts_as_taggable_on_steroids/macros.rb

Instance Method Summary collapse

Instance Method Details

#should_act_as_taggable_on_steroidsObject



5
6
7
8
9
10
11
12
13
14
15
# File 'lib/woulda/acts_as_taggable_on_steroids/macros.rb', line 5

def should_act_as_taggable_on_steroids
  klass = self.name.gsub(/Test$/, '').constantize

  should "include ActsAsTaggableOnSteroids methods" do
    assert klass.extended_by.include?(ActiveRecord::Acts::Taggable::ClassMethods)
    assert klass.extended_by.include?(ActiveRecord::Acts::Taggable::SingletonMethods)
    assert klass.include?(ActiveRecord::Acts::Taggable::InstanceMethods)
  end

  should_have_many :taggings, :tags
end