Method: Awspec::Setup.generate_rakefile

Defined in:
lib/awspec/setup.rb

.generate_rakefileObject



38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# File 'lib/awspec/setup.rb', line 38

def self.generate_rakefile
  content = <<-'EOF'
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new('spec')
task :default => :spec
EOF

  if File.exist? 'Rakefile'
    $stderr.puts '!! Rakefile already exists'
  else
    File.open('Rakefile', 'w') do |f|
      f.puts content
    end
    puts ' + Rakefile'
  end
end