Sha256: 2a262a75337ecc7b5d5445f6ae8a02997ea6e7e4d527a398df9ed902752db479
Contents?: true
Size: 884 Bytes
Versions: 6
Compression:
Stored size: 884 Bytes
Contents
require 'test_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