Sha256: 0619c8bb1c47aaa9fd63d343a25de251827c138f0035ad41a9718a23cdd57ad0

Contents?: true

Size: 885 Bytes

Versions: 6

Compression:

Stored size: 885 Bytes

Contents

require 'spec_helper'

module Commontator
  describe CommontatorConfig do
    it 'must respond to commontator attributes' do
      config = CommontatorConfig.new
      COMMONTATOR_ATTRIBUTES.each do |attribute|
        config.must_respond_to attribute
      end
    end
    
    it "won't respond to engine or commontable attributes" do
      config = CommontatorConfig.new
      (ENGINE_ATTRIBUTES + COMMONTABLE_ATTRIBUTES).each do |attribute|
        config.wont_respond_to attribute
      end
    end
    
    it 'must be configurable' do
      proc = lambda { |user| 'Some name' }
      proc2 = lambda { |user| 'Another name' }
      config = CommontatorConfig.new(:user_name_proc => proc)
      (config.user_name_proc == proc).must_equal true
      config = CommontatorConfig.new(:user_name_proc => proc2)
      (config.user_name_proc == proc2).must_equal true
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

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