Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
f651787a
Commit
f651787a
authored
May 27, 2021
by
James Fargher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Document new :silence_stdout rspec tag
Now that the filter needs to be explicitly inserted.
parent
3df43046
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
doc/development/testing_guide/testing_rake_tasks.md
doc/development/testing_guide/testing_rake_tasks.md
+5
-3
No files found.
doc/development/testing_guide/testing_rake_tasks.md
View file @
f651787a
...
...
@@ -11,19 +11,21 @@ in lieu of the standard Spec helper. Instead of `require 'spec_helper'`, use
`require 'rake_helper'`
. The helper includes
`spec_helper`
for you, and configures
a few other things to make testing Rake tasks easier.
At a minimum, requiring the Rake helper
redirects
`stdout`
, include the
runtime task helpers, and include
the
`RakeHelpers`
Spec support module.
At a minimum, requiring the Rake helper
includes the runtime task helpers, and
includes
the
`RakeHelpers`
Spec support module.
The
`RakeHelpers`
module exposes a
`run_rake_task(<task>)`
method to make
executing tasks simple. See
`spec/support/helpers/rake_helpers.rb`
for all available
methods.
`$stdout`
can be redirected by adding
`:silence_stdout`
.
Example:
```
ruby
require
'rake_helper'
describe
'gitlab:shell rake tasks'
do
describe
'gitlab:shell rake tasks'
,
:silence_stdout
do
before
do
Rake
.
application
.
rake_require
'tasks/gitlab/shell'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment