Sha256: 79136831ad3187d4d1e945e2e56db76cb8a4e637f1d54a9c81efe60161e1f999
Contents?: true
Size: 939 Bytes
Versions: 3
Compression:
Stored size: 939 Bytes
Contents
require 'rails_helper' module Commontator RSpec.describe CommontableConfig, type: :lib do it 'must respond to commontable attributes' do config = CommontableConfig.new COMMONTABLE_ATTRIBUTES.each do |attribute| expect(config).to 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| expect(config).not_to 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) expect(config.commontable_name_proc).to eq proc config = CommontableConfig.new(:commontable_name_proc => proc2) (config.commontable_name_proc == proc2).must_equal true end end end
Version data entries
3 entries across 3 versions & 1 rubygems