Skip to content

Commit

Permalink
Fixed up the rakefile so integration tests would pass, and added a ta…
Browse files Browse the repository at this point in the history
…sk to ensure correct setup
  • Loading branch information
ELLIOTTCABLE committed Apr 11, 2008
1 parent ba90594 commit b017c51
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Rakefile.rb
Expand Up @@ -24,13 +24,19 @@
Merb.start_environment(:environment => init_env, :adapter => 'runner')
end

task :check_config do
raise 'You need to copy config/database.yml.sample to config/database.yml, and add your data!' unless
File.file? 'config/database.yml'
end

# Runs specs, generates rcov, and opens rcov in your browser.
namespace :rcov do
Spec::Rake::SpecTask.new(:run) do |t|
t.spec_opts = ["--format", "specdoc", "--colour"]
t.spec_files = Dir['spec/**/*_spec.rb'].sort
t.libs = ['lib', 'server/lib' ]
t.rcov = true
t.rcov_opts = ['--exclude-only', '"thisdoesntexist"', '--include-file', '^app,^lib']
t.rcov_dir = :meta / :coverage
end

Expand All @@ -54,9 +60,9 @@
# end

desc 'Check everything over before commiting'
task :aok => [:'rcov:run', :'rcov:verify', :'rcov:open']
task :aok => [:check_config, :'rcov:run', :'rcov:verify', :'rcov:open']
# desc 'Task run during continuous integration'
task :cruise => [:'rcov:run', :'rcov:verify']
task :cruise => [:check_config, :'rcov:run', :'rcov:verify']

# Tasks for systems
Dir[Merb.root / "systems" / "*"].each do |system|
Expand Down

0 comments on commit b017c51

Please sign in to comment.