Class: Gemsmith::Builders::RSpec::Helper

Inherits:
Rubysmith::Builders::RSpec::Helper
  • Object
show all
Defined in:
lib/gemsmith/builders/rspec/helper.rb

Overview

Builds RSpec spec helper for project skeleton.

Instance Method Summary collapse

Instance Method Details

#callObject



12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/gemsmith/builders/rspec/helper.rb', line 12

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