Method: Awspec::Setup.generate_rakefile

Defined in:
lib/awspec/setup.rb

.generate_rakefileObject



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

def self.generate_rakefile
  content = "require 'rspec/core/rake_task'\nRSpec::Core::RakeTask.new('spec')\ntask :default => :spec\n"

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