Sha256: a4a96f71410b1a92a54b10f5f7c64e0ab432de78cd3a11103f88c253e8675304

Contents?: true

Size: 916 Bytes

Versions: 5

Compression:

Stored size: 916 Bytes

Contents

require 'spec_helper'

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

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
commontator-4.10.3 spec/lib/commontator/commontable_config_spec.rb
commontator-4.10.2 spec/lib/commontator/commontable_config_spec.rb
commontator-4.10.1 spec/lib/commontator/commontable_config_spec.rb
commontator-4.10.0 spec/lib/commontator/commontable_config_spec.rb
commontator-4.9.0 spec/lib/commontator/commontable_config_spec.rb