Commit 12e09986 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Refactor rake tasks for tests

parent b5e7096c
...@@ -45,7 +45,7 @@ Feature: Project Source Browse Files ...@@ -45,7 +45,7 @@ Feature: Project Source Browse Files
Then I am redirected to the new file on new branch Then I am redirected to the new file on new branch
And I should see its new content And I should see its new content
@javascript @tricky @javascript
Scenario: I can create file in empty repo Scenario: I can create file in empty repo
Given I own an empty project Given I own an empty project
And I visit my empty project page And I visit my empty project page
......
Rake::Task["spec"].clear if Rake::Task.task_defined?('spec') Rake::Task["spec"].clear if Rake::Task.task_defined?('spec')
namespace :spec do namespace :spec do
desc 'GITLAB | Run request specs' desc 'GitLab | Rspec | Run request specs'
task :api do task :api do
cmds = [ cmds = [
%W(rake gitlab:setup), %W(rake gitlab:setup),
...@@ -10,7 +10,7 @@ namespace :spec do ...@@ -10,7 +10,7 @@ namespace :spec do
run_commands(cmds) run_commands(cmds)
end end
desc 'GITLAB | Run feature specs' desc 'GitLab | Rspec | Run feature specs'
task :feature do task :feature do
cmds = [ cmds = [
%W(rake gitlab:setup), %W(rake gitlab:setup),
...@@ -19,7 +19,7 @@ namespace :spec do ...@@ -19,7 +19,7 @@ namespace :spec do
run_commands(cmds) run_commands(cmds)
end end
desc 'GITLAB | Run other specs' desc 'GitLab | Rspec | Run other specs'
task :other do task :other do
cmds = [ cmds = [
%W(rake gitlab:setup), %W(rake gitlab:setup),
...@@ -29,7 +29,7 @@ namespace :spec do ...@@ -29,7 +29,7 @@ namespace :spec do
end end
end end
desc "GITLAB | Run specs" desc "GitLab | Run specs"
task :spec do task :spec do
cmds = [ cmds = [
%W(rake gitlab:setup), %W(rake gitlab:setup),
......
Rake::Task["spinach"].clear if Rake::Task.task_defined?('spinach') Rake::Task["spinach"].clear if Rake::Task.task_defined?('spinach')
desc "GITLAB | Run spinach" namespace :spinach do
task :spinach do desc "GitLab | Spinach | Run project spinach features"
tags = if ENV['SEMAPHORE'] task :project do
'~@tricky' cmds = [
else %W(rake gitlab:setup),
'~@semaphore' %W(spinach --tags ~@admin,~@dashboard,~@profile,~@public,~@snippets),
end ]
run_commands(cmds)
cmds = [ end
%W(rake gitlab:setup),
%W(spinach --tags #{tags}),
]
run_commands(cmds)
end
desc "GITLAB | Run project spinach features" desc "GitLab | Spinach | Run other spinach features"
task :spinach_project do task :other do
cmds = [ cmds = [
%W(rake gitlab:setup), %W(rake gitlab:setup),
%W(spinach --tags ~@admin,~@dashboard,~@profile,~@public,~@snippets), %W(spinach --tags @admin,@dashboard,@profile,@public,@snippets),
] ]
run_commands(cmds) run_commands(cmds)
end
end end
desc "GITLAB | Run other spinach features" desc "GitLab | Run spinach"
task :spinach_other do task :spinach do
cmds = [ cmds = [
%W(rake gitlab:setup), %W(rake gitlab:setup),
%W(spinach --tags @admin,@dashboard,@profile,@public,@snippets), %W(spinach),
] ]
run_commands(cmds) run_commands(cmds)
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment