Sha256: 800939b646b771601c5caf9a649e2fbc0ce34fd59bba26f39325dfc5c25d8e18

Contents?: true

Size: 552 Bytes

Versions: 13

Compression:

Stored size: 552 Bytes

Contents

# frozen_string_literal: true

shared_examples_for "clean engine" do
  described_class.initializers.each do |initializer|
    describe "'#{initializer.name}' initializer" do
      let(:initializer_name_prefix) { described_class.to_s.sub(/::([A-Za-z]+)?Engine$/, "\\1").gsub("::", "").underscore }

      it "is named correctly" do
        expect(initializer.name).to start_with("#{initializer_name_prefix}.")
        expect(initializer.name).to match(/^[a-z0-9_.]+$/)
        expect(initializer.name).not_to start_with(".")
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
decidim-dev-0.29.1 lib/decidim/dev/test/rspec_support/engine_examples.rb
decidim-dev-0.28.4 lib/decidim/dev/test/rspec_support/engine_examples.rb
decidim-dev-0.29.0 lib/decidim/dev/test/rspec_support/engine_examples.rb
decidim-dev-0.28.3 lib/decidim/dev/test/rspec_support/engine_examples.rb
decidim-dev-0.29.0.rc4 lib/decidim/dev/test/rspec_support/engine_examples.rb
decidim-dev-0.29.0.rc3 lib/decidim/dev/test/rspec_support/engine_examples.rb
decidim-dev-0.29.0.rc2 lib/decidim/dev/test/rspec_support/engine_examples.rb
decidim-dev-0.29.0.rc1 lib/decidim/dev/test/rspec_support/engine_examples.rb
decidim-dev-0.28.2 lib/decidim/dev/test/rspec_support/engine_examples.rb
decidim-dev-0.28.1 lib/decidim/dev/test/rspec_support/engine_examples.rb
decidim-dev-0.28.0 lib/decidim/dev/test/rspec_support/engine_examples.rb
decidim-dev-0.28.0.rc5 lib/decidim/dev/test/rspec_support/engine_examples.rb
decidim-dev-0.28.0.rc4 lib/decidim/dev/test/rspec_support/engine_examples.rb