Sha256: bcbc7e52584ea60d51c18717316f23734925f4db82bfa21ed7982cb3f2f7f364
Contents?: true
Size: 851 Bytes
Versions: 8
Compression:
Stored size: 851 Bytes
Contents
# frozen_string_literal: true require "refinements/struct" module Gemsmith module Builders module RSpec # Builds RSpec spec helper for project skeleton. class Helper using Refinements::Struct def self.call(...) = new(...).call def initialize configuration, builder: Rubysmith::Builder @configuration = configuration @builder = builder end def call return configuration unless configuration.build_rspec && configuration.build_cli builder.call(configuration.merge(template_path: "%project_name%/spec/spec_helper.rb.erb")) .touch .replace("%r(^/spec/)", "%r((.+/container\\.rb|^/spec/))") configuration end private attr_reader :configuration, :builder end end end end
Version data entries
8 entries across 8 versions & 1 rubygems