diff options
author | Jeroen van Baarsen <jeroenvanbaarsen@gmail.com> | 2014-04-11 23:45:56 +0400 |
---|---|---|
committer | Jeroen van Baarsen <jeroenvanbaarsen@gmail.com> | 2014-04-11 23:45:56 +0400 |
commit | 5dd2f36ae153ac5a933a4e6ae0ae773508aa1f74 (patch) | |
tree | 2eaa3b90c13fde04fad3a09ea5752ffaeadc5e75 /lib/tasks | |
parent | 25eadf0c5bd05deb98f7ea0420fc5c63682cb989 (diff) |
Added API testing group
Diffstat (limited to 'lib/tasks')
-rw-r--r-- | lib/tasks/spec.rake | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/lib/tasks/spec.rake b/lib/tasks/spec.rake index 1f6ceca80bd..b760a607f7e 100644 --- a/lib/tasks/spec.rake +++ b/lib/tasks/spec.rake @@ -1,18 +1,11 @@ -namespace :testing do - desc 'GITLAB | Run model specs' - task :models do - cmds = [ - %W(rake gitlab:setup), - %W(rspec spec --tag @models) - ] - run_commands(cmds) - end +Rake::Task["spec"].clear if Rake::Task.task_defined?('spec') +namespace :spec do desc 'GITLAB | Run feature specs' - task :features do + task :api do cmds = [ %W(rake gitlab:setup), - %W(rspec spec --tag @features) + %W(rspec spec --tag @api) ] run_commands(cmds) end @@ -21,15 +14,24 @@ namespace :testing do task :other do cmds = [ %W(rake gitlab:setup), - %W(rspec spec --tag ~@models --tag ~@features) + %W(rspec spec --tag ~@api) ] run_commands(cmds) end +end + +desc "GITLAB | Run specs" +task :spec do + cmds = [ + %W(rake gitlab:setup), + %W(rspec spec), + ] + run_commands(cmds) +end - def run_commands(cmds) - cmds.each do |cmd| - system({'RAILS_ENV' => 'test', 'force' => 'yes'}, *cmd) - raise "#{cmd} failed!" unless $?.exitstatus.zero? - end +def run_commands(cmds) + cmds.each do |cmd| + system({'RAILS_ENV' => 'test', 'force' => 'yes'}, *cmd) + raise "#{cmd} failed!" unless $?.exitstatus.zero? end end |