Sha256: 0dbb1eb7769b7d4178b29e5aeba2146d38e519b539e5f90aa4e7b4b58c56d94e
Contents?: true
Size: 917 Bytes
Versions: 6
Compression:
Stored size: 917 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
6 entries across 6 versions & 1 rubygems