Sha256: 77e00e90f8cc3fa2a5415ab547a5f57a5bfc476b13d2c2a347a3b5fcb3db5c54
Contents?: true
Size: 932 Bytes
Versions: 4
Compression:
Stored size: 932 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) expect(config.commontable_name_proc).to eq proc2 end end end
Version data entries
4 entries across 4 versions & 1 rubygems