Sha256: 20eb49c49e8f59fd17bf2e1345bba6a13c6404f762a3cc51d8a810b4cd5d63f5

Contents?: true

Size: 540 Bytes

Versions: 8

Compression:

Stored size: 540 Bytes

Contents

require 'generators/rspec'

module Rspec
  module Generators
    # @private
    class GeneratorGenerator < Base
      class_option :generator_specs, type: :boolean, default: true,  desc: "Generate generator specs"

      def generate_generator_spec
        return unless options[:generator_specs]

        template template_name, target_path('generator', class_path, filename)
      end

      def template_name
        'generator_spec.rb'
      end

      def filename
        "#{table_name}_generator_spec.rb"
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
tinymce-rails-7.1.2 vendor/bundle/ruby/3.3.0/gems/rspec-rails-6.0.4/lib/generators/rspec/generator/generator_generator.rb
rspec-rails-6.1.1 lib/generators/rspec/generator/generator_generator.rb
rspec-rails-6.1.0 lib/generators/rspec/generator/generator_generator.rb
rspec-rails-6.0.4 lib/generators/rspec/generator/generator_generator.rb
rspec-rails-6.0.3 lib/generators/rspec/generator/generator_generator.rb
rspec-rails-6.0.2 lib/generators/rspec/generator/generator_generator.rb
rspec-rails-6.0.1 lib/generators/rspec/generator/generator_generator.rb
rspec-rails-6.0.0 lib/generators/rspec/generator/generator_generator.rb