Sha256: 36856466e1a1e87cc6c1fa0b713ed497aa4512ccb75c05f39b8fa9b30d64bbce
Contents?: true
Size: 832 Bytes
Versions: 6
Compression:
Stored size: 832 Bytes
Contents
require 'test_helper' require 'test/unit/assertions' module Commontator include Test::Unit::Assertions describe Commontator do it 'must respond to all attributes' do (ENGINE_ATTRIBUTES + COMMONTATOR_ATTRIBUTES + \ COMMONTABLE_ATTRIBUTES).each do |attribute| Commontator.must_respond_to attribute end end it 'must be configurable' do l1 = lambda { |controller| controller.current_user } l2 = lambda { |controller| controller.current_user } assert_not_equal(l1, l2) Commontator.configure do |config| config.current_user_proc = l1 end assert_equal(Commontator.current_user_proc, l1) Commontator.configure do |config| config.current_user_proc = l2 end assert_equal(Commontator.current_user_proc, l2) end end end
Version data entries
6 entries across 6 versions & 1 rubygems