Commit f6f80659ec23ffc7ad4847b13ac78047862f0d91

Authored by Dmitriy Zaporozhets
1 parent 50670948

Override rake spec and rake spinach tasks

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
@@ -21,8 +21,6 @@ services: @@ -21,8 +21,6 @@ services:
21 before_script: 21 before_script:
22 - "cp config/database.yml.$DB config/database.yml" 22 - "cp config/database.yml.$DB config/database.yml"
23 - "cp config/gitlab.yml.example config/gitlab.yml" 23 - "cp config/gitlab.yml.example config/gitlab.yml"
24 - - "bundle exec rake db:setup"  
25 - - "bundle exec rake db:seed_fu"  
26 script: "bundle exec rake $TASK --trace" 24 script: "bundle exec rake $TASK --trace"
27 notifications: 25 notifications:
28 email: false 26 email: false
lib/tasks/gitlab/test.rake
@@ -2,7 +2,6 @@ namespace :gitlab do @@ -2,7 +2,6 @@ namespace :gitlab do
2 desc "GITLAB | Run all tests" 2 desc "GITLAB | Run all tests"
3 task :test do 3 task :test do
4 cmds = [ 4 cmds = [
5 - %W(rake gitlab:setup),  
6 %W(rake spinach), 5 %W(rake spinach),
7 %W(rake spec), 6 %W(rake spec),
8 %W(rake jasmine:ci) 7 %W(rake jasmine:ci)
lib/tasks/spec.rake 0 → 100644
@@ -0,0 +1,14 @@ @@ -0,0 +1,14 @@
  1 +Rake::Task["spec"].clear
  2 +
  3 +desc "GITLAB | Run specs"
  4 +task :spec do
  5 + cmds = [
  6 + %W(rake gitlab:setup),
  7 + %W(rspec spec),
  8 + ]
  9 +
  10 + cmds.each do |cmd|
  11 + system({'RAILS_ENV' => 'test', 'force' => 'yes'}, *cmd)
  12 + raise "#{cmd} failed!" unless $?.exitstatus.zero?
  13 + end
  14 +end
lib/tasks/spinach.rake 0 → 100644
@@ -0,0 +1,14 @@ @@ -0,0 +1,14 @@
  1 +Rake::Task["spinach"].clear
  2 +
  3 +desc "GITLAB | Run spinach"
  4 +task :spinach do
  5 + cmds = [
  6 + %W(rake gitlab:setup),
  7 + %W(spinach),
  8 + ]
  9 +
  10 + cmds.each do |cmd|
  11 + system({'RAILS_ENV' => 'test', 'force' => 'yes'}, *cmd)
  12 + raise "#{cmd} failed!" unless $?.exitstatus.zero?
  13 + end
  14 +end