lib/rubysmith/builders/rspec/context.rb in rubysmith-0.5.0 vs lib/rubysmith/builders/rspec/context.rb in rubysmith-0.6.0
- old
+ new
@@ -15,12 +15,13 @@
end
def call
return unless realm.build_rspec
- builder.call(
- realm.with(template_path: "%project_name%/spec/support/shared_contexts/temp_dir.rb.erb")
- ).render
+ realm.with(template_path: "%project_name%/spec/support/shared_contexts/temp_dir.rb.erb")
+ .then { |new_realm| builder.call new_realm }
+ .render
+ .replace(/\n\s+\n\s+/, "\n ")
end
private
attr_reader :realm, :builder