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
4561a09c
Commit
4561a09c
authored
Sep 05, 2014
by
Charles Bushong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleaning for the hound
parent
858dbd08
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
15 deletions
+30
-15
features/steps/shared/snippet.rb
features/steps/shared/snippet.rb
+18
-3
features/steps/snippet_search.rb
features/steps/snippet_search.rb
+12
-12
No files found.
features/steps/shared/snippet.rb
View file @
4561a09c
...
...
@@ -20,9 +20,24 @@ module SharedSnippet
end
And
'I have a public many lined snippet'
do
create
(
:personal_snippet
,
title:
"Many lined snippet"
,
content:
"line one
\n
line two
\n
line three
\n
line four
\n
line five
\n
line six
\n
line seven
\n
line eight
\n
line nine
\n
line ten
\n
line eleven
\n
line twelve
\n
line thirteen
\n
line fourteen"
,
file_name:
"many_lined_snippet.rb"
,
title:
'Many lined snippet'
,
content:
<<-
END
.
gsub
(
/^\s+\|/
,
''
),
|line one
|line two
|line three
|line four
|line five
|line six
|line seven
|line eight
|line nine
|line ten
|line eleven
|line twelve
|line thirteen
|line fourteen
END
file_name:
'many_lined_snippet.rb'
,
private:
true
,
author:
current_user
)
end
...
...
features/steps/snippet_search.rb
View file @
4561a09c
...
...
@@ -6,51 +6,51 @@ class Spinach::Features::SnippetSearch < Spinach::FeatureSteps
include
SharedSearch
step
'I search for "snippet" in snippet titles'
do
search_snippet_titles
"snippet"
search_snippet_titles
'snippet'
end
step
'I search for "snippet private" in snippet titles'
do
search_snippet_titles
"snippet private"
search_snippet_titles
'snippet private'
end
step
'I search for "line seven" in snippet contents'
do
search_snippet_contents
"line seven"
search_snippet_contents
'line seven'
end
step
'I should see "line seven" in results'
do
page
.
should
have_content
"line seven"
page
.
should
have_content
'line seven'
end
step
'I should see "line four" in results'
do
page
.
should
have_content
"line four"
page
.
should
have_content
'line four'
end
step
'I should see "line ten" in results'
do
page
.
should
have_content
"line ten"
page
.
should
have_content
'line ten'
end
step
'I should not see "line eleven" in results'
do
page
.
should_not
have_content
"line eleven"
page
.
should_not
have_content
'line eleven'
end
step
'I should not see "line three" in results'
do
page
.
should_not
have_content
"line three"
page
.
should_not
have_content
'line three'
end
Then
'I should see "Personal snippet one" in results'
do
page
.
should
have_content
"Personal snippet one"
page
.
should
have_content
'Personal snippet one'
end
And
'I should see "Personal snippet private" in results'
do
page
.
should
have_content
"Personal snippet private"
page
.
should
have_content
'Personal snippet private'
end
Then
'I should not see "Personal snippet one" in results'
do
page
.
should_not
have_content
"Personal snippet one"
page
.
should_not
have_content
'Personal snippet one'
end
And
'I should not see "Personal snippet private" in results'
do
page
.
should_not
have_content
"Personal snippet private"
page
.
should_not
have_content
'Personal snippet private'
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