Sha256: 77e8ae86e6a4894e155a12c9a6cf850bfe008accb633fcbd01990eb57ac97efd

Contents?: true

Size: 622 Bytes

Versions: 10

Compression:

Stored size: 622 Bytes

Contents

# frozen_string_literal: true

require "refinements/struct"

module Gemsmith
  module Builders
    module RSpec
      # Builds RSpec spec helper for project skeleton.
      class Helper < Rubysmith::Builders::RSpec::Helper
        using Refinements::Struct

        def call
          return false unless settings.build_rspec

          super

          return false unless settings.build_cli

          builder.call(settings.merge(template_path: "%project_name%/spec/spec_helper.rb.erb"))
                 .replace("%r(^/spec/)", "%r((.+/container\\.rb|^/spec/))")

          true
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
gemsmith-22.10.0 lib/gemsmith/builders/rspec/helper.rb
gemsmith-22.9.0 lib/gemsmith/builders/rspec/helper.rb
gemsmith-22.8.0 lib/gemsmith/builders/rspec/helper.rb
gemsmith-22.7.0 lib/gemsmith/builders/rspec/helper.rb
gemsmith-22.6.0 lib/gemsmith/builders/rspec/helper.rb
gemsmith-22.5.0 lib/gemsmith/builders/rspec/helper.rb
gemsmith-22.4.0 lib/gemsmith/builders/rspec/helper.rb
gemsmith-22.3.0 lib/gemsmith/builders/rspec/helper.rb
gemsmith-22.2.0 lib/gemsmith/builders/rspec/helper.rb
gemsmith-22.1.0 lib/gemsmith/builders/rspec/helper.rb