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
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
09f2bec6
Commit
09f2bec6
authored
Jun 24, 2015
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prefix random Markdown tips with "Tip:"
parent
82a67170
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
app/helpers/gitlab_markdown_helper.rb
app/helpers/gitlab_markdown_helper.rb
+1
-1
spec/helpers/gitlab_markdown_helper_spec.rb
spec/helpers/gitlab_markdown_helper_spec.rb
+1
-1
No files found.
app/helpers/gitlab_markdown_helper.rb
View file @
09f2bec6
...
@@ -118,7 +118,7 @@ module GitlabMarkdownHelper
...
@@ -118,7 +118,7 @@ module GitlabMarkdownHelper
# Returns a random markdown tip for use as a textarea placeholder
# Returns a random markdown tip for use as a textarea placeholder
def
random_markdown_tip
def
random_markdown_tip
MARKDOWN_TIPS
.
sample
"Tip:
#{
MARKDOWN_TIPS
.
sample
}
"
end
end
private
private
...
...
spec/helpers/gitlab_markdown_helper_spec.rb
View file @
09f2bec6
...
@@ -137,7 +137,7 @@ describe GitlabMarkdownHelper do
...
@@ -137,7 +137,7 @@ describe GitlabMarkdownHelper do
describe
'random_markdown_tip'
do
describe
'random_markdown_tip'
do
it
'returns a random Markdown tip'
do
it
'returns a random Markdown tip'
do
stub_const
(
"
#{
described_class
}
::MARKDOWN_TIPS"
,
[
'Random tip'
])
stub_const
(
"
#{
described_class
}
::MARKDOWN_TIPS"
,
[
'Random tip'
])
expect
(
random_markdown_tip
).
to
eq
'Random tip'
expect
(
random_markdown_tip
).
to
eq
'
Tip:
Random tip'
end
end
end
end
end
end
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