Class: Hanamismith::Builders::RSpec::Helper

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

Overview

Builds project skeleton RSpec helper.

Instance Method Summary collapse

Instance Method Details

#callObject



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

def call
  return configuration unless configuration.build_rspec

  super
  path = "%project_name%/spec/spec_helper.rb.erb"
  builder.call(configuration.merge(template_path: path))
         .replace(/require.+#{configuration.project_name}.+\n/, "")
  configuration
end