Sha256: ecbc5f403fb735b5e65bdcb2e7ab510a78daa149bbe29f3880658f80dec32c70

Contents?: true

Size: 920 Bytes

Versions: 15

Compression:

Stored size: 920 Bytes

Contents

require 'spec_helper'

module Commontator
  describe ActsAsCommontator do
    it 'must add methods to ActiveRecord and subclasses' do
      ActiveRecord::Base.must_respond_to :acts_as_commontator
      ActiveRecord::Base.must_respond_to :is_commontator
      ActiveRecord::Base.is_commontator.must_equal false
      DummyModel.must_respond_to :acts_as_commontator
      DummyModel.must_respond_to :is_commontator
      DummyModel.is_commontator.must_equal false
      DummyUser.must_respond_to :acts_as_commontator
      DummyUser.must_respond_to :is_commontator
      DummyUser.is_commontator.must_equal true
    end
    
    it 'must modify models that act_as_commontator' do
      user = DummyUser.create
      user.must_respond_to :comments
      user.must_respond_to :subscriptions
      user.must_respond_to :commontator_config
      user.commontator_config.must_be_instance_of CommontatorConfig
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
commontator-4.10.3 spec/lib/commontator/acts_as_commontator_spec.rb
commontator-4.10.2 spec/lib/commontator/acts_as_commontator_spec.rb
commontator-4.10.1 spec/lib/commontator/acts_as_commontator_spec.rb
commontator-4.10.0 spec/lib/commontator/acts_as_commontator_spec.rb
commontator-4.9.0 spec/lib/commontator/acts_as_commontator_spec.rb
commontator-2.0.1 spec/lib/commontator/acts_as_commontator_spec.rb~
commontator-2.0.0 spec/lib/commontator/acts_as_commontator_spec.rb~
commontator-1.1.3 spec/lib/commontator/acts_as_commontator_spec.rb~
commontator-1.1.2 spec/lib/commontator/acts_as_commontator_spec.rb~
commontator-1.1.1 spec/lib/commontator/acts_as_commontator_spec.rb
commontator-1.1.0 spec/lib/commontator/acts_as_commontator_spec.rb
commontator-1.0.6 spec/lib/commontator/acts_as_commontator_spec.rb
commontator-1.0.5 spec/lib/commontator/acts_as_commontator_spec.rb
commontator-1.0.4 spec/lib/commontator/acts_as_commontator_spec.rb
commontator-1.0.3 spec/lib/commontator/acts_as_commontator_spec.rb