BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
27528d44
Commit
27528d44
authored
Nov 03, 2016
by
the-undefined
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move spinach public snippet feature to rspec spec
- Add rspec feature for public snippets - Remove spinach test for public snippets
parent
b27de4ab
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
35 deletions
+19
-35
public_snippets.feature
features/snippets/public_snippets.feature
+0
-10
public_snippets.rb
features/steps/snippets/public_snippets.rb
+0
-25
public_snippets_spec.rb
spec/features/snippets/public_snippets_spec.rb
+19
-0
No files found.
features/snippets/public_snippets.feature
deleted
100644 → 0
View file @
b27de4ab
Feature
:
Public snippets
Scenario
:
Unauthenticated user should see public snippets
Given
There is public
"Personal snippet one"
snippet
And
I visit snippet page
"Personal snippet one"
Then
I should see snippet
"Personal snippet one"
Scenario
:
Unauthenticated user should see raw public snippets
Given
There is public
"Personal snippet one"
snippet
And
I visit snippet raw page
"Personal snippet one"
Then
I should see raw snippet
"Personal snippet one"
features/steps/snippets/public_snippets.rb
deleted
100644 → 0
View file @
b27de4ab
class
Spinach
::
Features
::
PublicSnippets
<
Spinach
::
FeatureSteps
include
SharedAuthentication
include
SharedPaths
include
SharedSnippet
step
'I should see snippet "Personal snippet one"'
do
expect
(
page
).
to
have_no_xpath
(
"//i[@class='public-snippet']"
)
end
step
'I should see raw snippet "Personal snippet one"'
do
expect
(
page
).
to
have_text
(
snippet
.
content
)
end
step
'I visit snippet page "Personal snippet one"'
do
visit
snippet_path
(
snippet
)
end
step
'I visit snippet raw page "Personal snippet one"'
do
visit
raw_snippet_path
(
snippet
)
end
def
snippet
@snippet
||=
PersonalSnippet
.
find_by!
(
title:
"Personal snippet one"
)
end
end
spec/features/snippets/public_snippets_spec.rb
0 → 100644
View file @
27528d44
require
'rails_helper'
feature
'Public Snippets'
,
feature:
true
do
scenario
'Unauthenticated user should see public snippets'
do
public_snippet
=
create
(
:personal_snippet
,
:public
)
visit
snippet_path
(
public_snippet
)
expect
(
page
).
to
have_content
(
public_snippet
.
content
)
end
scenario
'Unauthenticated user should see raw public snippets'
do
public_snippet
=
create
(
:personal_snippet
,
:public
)
visit
raw_snippet_path
(
public_snippet
)
expect
(
page
).
to
have_content
(
public_snippet
.
content
)
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