Sha256: a1c4420d08254513e026f6100bc0ac77ba8d4fac54aca88a260f2a50a1f913ef

Contents?: true

Size: 740 Bytes

Versions: 6

Compression:

Stored size: 740 Bytes

Contents

require 'spec_helper'

module Commontator
  describe Commontator do
    it 'must respond to all attributes' do
      (ENGINE_ATTRIBUTES + COMMONTATOR_ATTRIBUTES + \
        COMMONTABLE_ATTRIBUTES).each do |attribute|
        Commontator.must_respond_to attribute
      end
    end
    
    it 'must be configurable' do
      l1 = lambda { |controller| controller.current_user }
      l2 = lambda { |controller| controller.current_user }
      Commontator.configure do |config|
        config.current_user_proc = l1
      end
      assert_equal(Commontator.current_user_proc, l1)
      Commontator.configure do |config|
        config.current_user_proc = l2
      end
      assert_equal(Commontator.current_user_proc, l2)
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
commontator-4.8.0 spec/lib/commontator_spec.rb
commontator-4.7.2 spec/lib/commontator_spec.rb
commontator-4.7.1 spec/lib/commontator_spec.rb
commontator-4.7.0 spec/lib/commontator_spec.rb
commontator-4.6.1 spec/lib/commontator_spec.rb
commontator-4.6.0 spec/lib/commontator_spec.rb