diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-04-21 02:50:22 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-04-21 02:50:22 +0300 |
commit | 9dc93a4519d9d5d7be48ff274127136236a3adb3 (patch) | |
tree | 70467ae3692a0e35e5ea56bcb803eb512a10bedb /lib/tasks/spec.rake | |
parent | 4b0f34b6d759d6299322b3a54453e930c6121ff0 (diff) |
Add latest changes from gitlab-org/gitlab@13-11-stable-eev13.11.0-rc43
Diffstat (limited to 'lib/tasks/spec.rake')
-rw-r--r-- | lib/tasks/spec.rake | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/lib/tasks/spec.rake b/lib/tasks/spec.rake index bf18332a8eb..5eed5d4dce4 100644 --- a/lib/tasks/spec.rake +++ b/lib/tasks/spec.rake @@ -2,30 +2,44 @@ return if Rails.env.production? +require_relative '../../tooling/merge_request_rspec_failure_rake_task' + namespace :spec do desc 'GitLab | RSpec | Run unit tests' RSpec::Core::RakeTask.new(:unit, :rspec_opts) do |t, args| - require_dependency 'quality/test_level' + require_test_level t.pattern = Quality::TestLevel.new.pattern(:unit) t.rspec_opts = args[:rspec_opts] end desc 'GitLab | RSpec | Run integration tests' RSpec::Core::RakeTask.new(:integration, :rspec_opts) do |t, args| - require_dependency 'quality/test_level' + require_test_level t.pattern = Quality::TestLevel.new.pattern(:integration) t.rspec_opts = args[:rspec_opts] end desc 'GitLab | RSpec | Run system tests' RSpec::Core::RakeTask.new(:system, :rspec_opts) do |t, args| - require_dependency 'quality/test_level' + require_test_level t.pattern = Quality::TestLevel.new.pattern(:system) t.rspec_opts = args[:rspec_opts] end + desc 'GitLab | RSpec | Run merge request RSpec failures' + Tooling::MergeRequestRspecFailureRakeTask.new(:merge_request_rspec_failure, :rspec_opts) do |t, args| + t.pattern = t.rspec_failures_on_merge_request + t.rspec_opts = args[:rspec_opts] + end + desc 'Run the code examples in spec/requests/api' RSpec::Core::RakeTask.new(:api) do |t| t.pattern = 'spec/requests/api/**/*_spec.rb' end + + private + + def require_test_level + require_relative '../../tooling/quality/test_level' + end end |