Sha256: 591d6051ee631915707f30950089745c5f45d8d455941f828989f015064f6e88

Contents?: true

Size: 860 Bytes

Versions: 3

Compression:

Stored size: 860 Bytes

Contents

module Gemsmith
  module Skeletons
    # Configures RSpec support.
    class RspecSkeleton < BaseSkeleton
      def create
        return unless configuration.create_rspec?

        cli.template "%gem_name%/lib/tasks/rspec.rake.tt", configuration.to_h
        cli.template "#{rspec_root}/spec_helper.rb.tt", configuration.to_h
        cli.template "#{rspec_root}/lib/%gem_name%/%gem_name%_spec.rb.tt", configuration.to_h
        cli.template "#{rspec_root}/support/kit/default_config.rb.tt", configuration.to_h
        cli.template "#{rspec_root}/support/kit/stderr.rb.tt", configuration.to_h
        cli.template "#{rspec_root}/support/kit/stdout.rb.tt", configuration.to_h
        cli.template "#{rspec_root}/support/kit/temp_dir.rb.tt", configuration.to_h
      end

      private

      def rspec_root
        "%gem_name%/spec"
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
gemsmith-6.2.0 lib/gemsmith/skeletons/rspec_skeleton.rb
gemsmith-6.1.0 lib/gemsmith/skeletons/rspec_skeleton.rb
gemsmith-6.0.0 lib/gemsmith/skeletons/rspec_skeleton.rb