Class: Docs::Generators::BuildDocsGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/docs/build_docs_generator.rb

Instance Method Summary collapse

Instance Method Details

#build_docsObject



7
8
9
10
11
12
13
14
15
16
# File 'lib/generators/docs/build_docs_generator.rb', line 7

def build_docs
  destination = "spec/spec_helper.rb"
  if File.exist?(destination)
    uncomment_lines(destination, /config.after\(:suite\) \{ SmashingDocs.finish! \}/)
    `rspec spec`
    comment_lines(destination, /config.after\(:suite\) \{ SmashingDocs.finish! \}/)
  else
    puts "Could not find spec/spec_helper.rb"
  end
end