Sha256: 44776ffdf27b36ee752f084370662e2f1ec3511312a65f2de1e4be2d2883136c
Contents?: true
Size: 749 Bytes
Versions: 2
Compression:
Stored size: 749 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 = ->(controller) { controller.current_user } l2 = ->(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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
commontator-5.1.0 | spec/lib/commontator_spec.rb |
commontator-5.0.0 | spec/lib/commontator_spec.rb |