Sha256: 5eaed1e39e388d59a87a23831b0969431aa505aefe12e2d99cd70f86c65e228e

Contents?: true

Size: 668 Bytes

Versions: 27

Compression:

Stored size: 668 Bytes

Contents

# frozen_string_literal: true
# encoding: utf-8

require "spec_helper"

describe Mongoid::Composable do

  describe ".prohibited_methods" do

    let(:methods) do
      described_class.prohibited_methods
    end

    Mongoid::Composable::MODULES.each do |mod|

      context "when checking in #{mod}" do

        mod.instance_methods.each do |method|

          it "includes #{method}" do
            expect(methods).to include(method.to_sym)
          end
        end
      end
    end

    Mongoid::Composable::RESERVED_METHOD_NAMES.each do |name|

      it "includes the method names #{name}" do
        expect(methods).to include(name)
      end
    end
  end
end

Version data entries

27 entries across 27 versions & 2 rubygems

Version Path
mongoid-7.3.5 spec/mongoid/composable_spec.rb
mongoid-7.3.4 spec/mongoid/composable_spec.rb
mongoid-7.1.11 spec/mongoid/composable_spec.rb
mongoid-7.2.6 spec/mongoid/composable_spec.rb
mongoid-7.3.3 spec/mongoid/composable_spec.rb
mongoid-7.3.2 spec/mongoid/composable_spec.rb
mongoid-7.2.5 spec/mongoid/composable_spec.rb
mongoid-7.1.10 spec/mongoid/composable_spec.rb
mongoid-7.1.9 spec/mongoid/composable_spec.rb
mongoid-7.2.4 spec/mongoid/composable_spec.rb
mongoid-7.3.1 spec/mongoid/composable_spec.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/mongoid-7.1.7/spec/mongoid/composable_spec.rb
mongoid-7.3.0 spec/mongoid/composable_spec.rb
mongoid-7.2.3 spec/mongoid/composable_spec.rb
mongoid-7.1.8 spec/mongoid/composable_spec.rb
mongoid-7.2.2 spec/mongoid/composable_spec.rb
mongoid-7.2.1 spec/mongoid/composable_spec.rb
mongoid-7.1.7 spec/mongoid/composable_spec.rb
mongoid-7.2.0 spec/mongoid/composable_spec.rb
mongoid-7.1.6 spec/mongoid/composable_spec.rb