Sha256: f3778636e324243f36441b0cf2ee94b022cec92001e9e29e8a56a8b8eff23faf
Contents?: true
Size: 959 Bytes
Versions: 6
Compression:
Stored size: 959 Bytes
Contents
require 'rails_helper' module Commontator RSpec.describe ActsAsCommontable, type: :lib do it 'must add methods to ActiveRecord and subclasses' do expect(ActiveRecord::Base).to respond_to(:acts_as_commontable) expect(ActiveRecord::Base).to respond_to(:is_commontable) expect(ActiveRecord::Base.is_commontable).to eq false expect(DummyModel).to respond_to(:acts_as_commontable) expect(DummyModel).to respond_to(:is_commontable) expect(DummyModel.is_commontable).to eq true expect(DummyUser).to respond_to(:acts_as_commontable) expect(DummyUser).to respond_to(:is_commontable) expect(DummyUser.is_commontable).to eq false end it 'must modify models that act_as_commontable' do dummy = DummyModel.create expect(dummy).to respond_to(:thread) expect(dummy).to respond_to(:commontable_config) expect(dummy.commontable_config).to be_a(CommontableConfig) end end end
Version data entries
6 entries across 6 versions & 1 rubygems