Sha256: ee062738881e2007bc67951ed97b8b318a09ebea53fe950a797a63549cc3452a
Contents?: true
Size: 662 Bytes
Versions: 10
Compression:
Stored size: 662 Bytes
Contents
# frozen_string_literal: true require "refinements/struct" module Rubysmith module Builders module RSpec # Builds RSpec shared context for temporary directories. class Context < Abstract using Refinements::Struct def call return false unless settings.build_rspec template = "%project_name%/spec/support/shared_contexts/temp_dir.rb.erb" settings.merge(template_path: template) .then { |updated_configuration| builder.call updated_configuration } .render .replace(/\n\s+\n\s+/, "\n ") true end end end end end
Version data entries
10 entries across 10 versions & 1 rubygems