Sha256: 3a5610340c21f1e25527fb321789e4092355da6ca2be84267f16b3f0202a116c

Contents?: true

Size: 418 Bytes

Versions: 1

Compression:

Stored size: 418 Bytes

Contents

module Rspec
  module Generators
    class QueryGenerator < ::Rails::Generators::NamedBase
      source_root File.expand_path("templates", __dir__)

      def create_test_file
        template "query_spec.rb",
          File.join("spec/queries", class_path, "#{file_name}_query_spec.rb")
      end

      hide!

      private

      def query_path
        AppQuery.configuration.query_path
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
appquery-0.2.0 lib/rails/generators/rspec/query_generator.rb