Sha256: e9c08307627493b5013eca237073593d7702ff34fecd5aebcfbd967a42d4741c

Contents?: true

Size: 892 Bytes

Versions: 6

Compression:

Stored size: 892 Bytes

Contents

require 'spec_helper'

module Commontator
  describe CommontatorConfig do
    it 'must respond to commontator attributes' do
      config = Commontator::CommontatorConfig.new
      Commontator::COMMONTATOR_ATTRIBUTES.each do |attribute|
        config.must_respond_to attribute
      end
    end
    
    it 'wont respond to engine or commontable attributes' do
      config = Commontator::CommontatorConfig.new
      (Commontator::ENGINE_ATTRIBUTES + Commontator::COMMONTABLE_ATTRIBUTES).each do |attribute|
        config.wont_respond_to attribute
      end
    end
    
    it 'must be configurable' do
      config = Commontator::CommontatorConfig.new(:user_missing_name => 'Anon')
      config.user_missing_name.must_equal 'Anon'
      config = Commontator::CommontatorConfig.new(:user_missing_name => 'Anonymous')
      config.user_missing_name.must_equal 'Anonymous'
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
commontator-1.1.1 spec/lib/commontator/commontator_config_spec.rb~
commontator-1.1.0 spec/lib/commontator/commontator_config_spec.rb~
commontator-1.0.6 spec/lib/commontator/commontator_config_spec.rb~
commontator-1.0.5 spec/lib/commontator/commontator_config_spec.rb~
commontator-1.0.4 spec/lib/commontator/commontator_config_spec.rb~
commontator-1.0.3 spec/lib/commontator/commontator_config_spec.rb~