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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
6dc5dab7
Commit
6dc5dab7
authored
Nov 10, 2017
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Configure RSpec from within RSpec runner class
parent
a5ab2a5e
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
13 deletions
+7
-13
qa/qa/scenario/entrypoint.rb
qa/qa/scenario/entrypoint.rb
+0
-1
qa/qa/specs/config.rb
qa/qa/specs/config.rb
+0
-3
qa/qa/specs/runner.rb
qa/qa/specs/runner.rb
+7
-9
No files found.
qa/qa/scenario/entrypoint.rb
View file @
6dc5dab7
...
...
@@ -9,7 +9,6 @@ module QA
def
perform
(
address
,
*
files
)
Runtime
::
Scenario
.
define
(
:gitlab_address
,
address
)
Specs
::
Config
.
perform
##
# Perform before hooks, which are different for CE and EE
...
...
qa/qa/specs/config.rb
View file @
6dc5dab7
...
...
@@ -9,8 +9,6 @@ require 'selenium-webdriver'
module
QA
module
Specs
class
Config
<
Scenario
::
Template
attr_writer
:address
def
perform
configure_rspec!
configure_capybara!
...
...
@@ -50,7 +48,6 @@ module QA
end
Capybara
.
configure
do
|
config
|
# config.app_host = @address
config
.
default_driver
=
:chrome
config
.
javascript_driver
=
:chrome
config
.
default_max_wait_time
=
4
...
...
qa/qa/specs/runner.rb
View file @
6dc5dab7
...
...
@@ -2,16 +2,14 @@ require 'rspec/core'
module
QA
module
Specs
class
Runner
include
Scenario
::
Actable
def
rspec
(
tty:
false
,
tags:
[],
files:
[
'qa/specs/features'
])
class
Runner
<
Scenario
::
Template
def
perform
(
tty:
false
,
tags:
[],
files:
[
'qa/specs/features'
])
args
=
[]
args
<<
'--tty'
if
tty
tags
.
to_a
.
each
do
|
tag
|
args
<<
[
'-t'
,
tag
.
to_s
]
end
args
<<
files
args
.
push
(
'--tty'
)
if
tty
tags
.
to_a
.
each
{
|
tag
|
args
.
push
([
'-t'
,
tag
.
to_s
])
}
args
.
push
(
files
)
Specs
::
Config
.
perform
RSpec
::
Core
::
Runner
.
run
(
args
.
flatten
,
$stderr
,
$stdout
).
tap
do
|
status
|
abort
if
status
.
nonzero?
...
...
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