Sha256: d4baad0ab6bbc3e56eb9bea4a8f60eaf00420a12ca5b37c86440d6074fa97e49
Contents?: true
Size: 760 Bytes
Versions: 4
Compression:
Stored size: 760 Bytes
Contents
require 'rails_helper' module Commontator RSpec.describe Commontator, type: :lib do it 'must respond to all attributes' do (ENGINE_ATTRIBUTES + COMMONTATOR_ATTRIBUTES + \ COMMONTABLE_ATTRIBUTES).each do |attribute| expect(Commontator).to respond_to(attribute) end end it 'must be configurable' do l1 = lambda { |controller| controller.current_user } l2 = lambda { |controller| controller.current_user } Commontator.configure do |config| config.current_user_proc = l1 end expect(Commontator.current_user_proc).to eq l1 Commontator.configure do |config| config.current_user_proc = l2 end expect(Commontator.current_user_proc).to eq l2 end end end
Version data entries
4 entries across 4 versions & 1 rubygems