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
Boxiang Sun
gitlab-ce
Commits
dca785e5
Commit
dca785e5
authored
Mar 26, 2018
by
Brett Walker
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
allow rspec files/options to be passed down in all cases
parent
cb94afc5
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
12 deletions
+12
-12
qa/qa/scenario/bootable.rb
qa/qa/scenario/bootable.rb
+1
-1
qa/qa/scenario/test/instance.rb
qa/qa/scenario/test/instance.rb
+4
-4
qa/qa/scenario/test/integration/mattermost.rb
qa/qa/scenario/test/integration/mattermost.rb
+2
-2
qa/qa/specs/runner.rb
qa/qa/specs/runner.rb
+3
-3
qa/spec/scenario/test/instance_spec.rb
qa/spec/scenario/test/instance_spec.rb
+2
-2
No files found.
qa/qa/scenario/bootable.rb
View file @
dca785e5
...
@@ -23,7 +23,7 @@ module QA
...
@@ -23,7 +23,7 @@ module QA
arguments
.
parse!
(
argv
)
arguments
.
parse!
(
argv
)
self
.
perform
(
**
Runtime
::
Scenario
.
attributes
)
self
.
perform
(
Runtime
::
Scenario
.
attributes
,
*
arguments
.
default_argv
)
end
end
private
private
...
...
qa/qa/scenario/test/instance.rb
View file @
dca785e5
...
@@ -11,7 +11,7 @@ module QA
...
@@ -11,7 +11,7 @@ module QA
tags
:core
tags
:core
def
perform
(
address
,
*
file
s
)
def
perform
(
address
,
*
rspec_option
s
)
Runtime
::
Scenario
.
define
(
:gitlab_address
,
address
)
Runtime
::
Scenario
.
define
(
:gitlab_address
,
address
)
##
##
...
@@ -22,9 +22,9 @@ module QA
...
@@ -22,9 +22,9 @@ module QA
Specs
::
Runner
.
perform
do
|
specs
|
Specs
::
Runner
.
perform
do
|
specs
|
specs
.
tty
=
true
specs
.
tty
=
true
specs
.
tags
=
self
.
class
.
focus
specs
.
tags
=
self
.
class
.
focus
specs
.
file
s
=
specs
.
option
s
=
if
file
s
.
any?
if
rspec_option
s
.
any?
file
s
rspec_option
s
else
else
File
.
expand_path
(
'../../specs/features'
,
__dir__
)
File
.
expand_path
(
'../../specs/features'
,
__dir__
)
end
end
...
...
qa/qa/scenario/test/integration/mattermost.rb
View file @
dca785e5
...
@@ -9,10 +9,10 @@ module QA
...
@@ -9,10 +9,10 @@ module QA
class
Mattermost
<
Test
::
Instance
class
Mattermost
<
Test
::
Instance
tags
:core
,
:mattermost
tags
:core
,
:mattermost
def
perform
(
address
,
mattermost
,
*
file
s
)
def
perform
(
address
,
mattermost
,
*
rspec_option
s
)
Runtime
::
Scenario
.
define
(
:mattermost_address
,
mattermost
)
Runtime
::
Scenario
.
define
(
:mattermost_address
,
mattermost
)
super
(
address
,
*
file
s
)
super
(
address
,
*
rspec_option
s
)
end
end
end
end
end
end
...
...
qa/qa/specs/runner.rb
View file @
dca785e5
...
@@ -3,19 +3,19 @@ require 'rspec/core'
...
@@ -3,19 +3,19 @@ require 'rspec/core'
module
QA
module
QA
module
Specs
module
Specs
class
Runner
<
Scenario
::
Template
class
Runner
<
Scenario
::
Template
attr_accessor
:tty
,
:tags
,
:
file
s
attr_accessor
:tty
,
:tags
,
:
option
s
def
initialize
def
initialize
@tty
=
false
@tty
=
false
@tags
=
[]
@tags
=
[]
@
file
s
=
[
File
.
expand_path
(
'./features'
,
__dir__
)]
@
option
s
=
[
File
.
expand_path
(
'./features'
,
__dir__
)]
end
end
def
perform
def
perform
args
=
[]
args
=
[]
args
.
push
(
'--tty'
)
if
tty
args
.
push
(
'--tty'
)
if
tty
tags
.
to_a
.
each
{
|
tag
|
args
.
push
([
'-t'
,
tag
.
to_s
])
}
tags
.
to_a
.
each
{
|
tag
|
args
.
push
([
'-t'
,
tag
.
to_s
])
}
args
.
push
(
file
s
)
args
.
push
(
option
s
)
Runtime
::
Browser
.
configure!
Runtime
::
Browser
.
configure!
...
...
qa/spec/scenario/test/instance_spec.rb
View file @
dca785e5
...
@@ -29,7 +29,7 @@ describe QA::Scenario::Test::Instance do
...
@@ -29,7 +29,7 @@ describe QA::Scenario::Test::Instance do
it
'should call runner with default arguments'
do
it
'should call runner with default arguments'
do
subject
.
perform
(
"test"
)
subject
.
perform
(
"test"
)
expect
(
runner
).
to
have_received
(
:
file
s
=
)
expect
(
runner
).
to
have_received
(
:
option
s
=
)
.
with
(
File
.
expand_path
(
'../../../qa/specs/features'
,
__dir__
))
.
with
(
File
.
expand_path
(
'../../../qa/specs/features'
,
__dir__
))
end
end
end
end
...
@@ -38,7 +38,7 @@ describe QA::Scenario::Test::Instance do
...
@@ -38,7 +38,7 @@ describe QA::Scenario::Test::Instance do
it
'should call runner with paths'
do
it
'should call runner with paths'
do
subject
.
perform
(
'test'
,
'path1'
,
'path2'
)
subject
.
perform
(
'test'
,
'path1'
,
'path2'
)
expect
(
runner
).
to
have_received
(
:
file
s
=
).
with
(
%w[path1 path2]
)
expect
(
runner
).
to
have_received
(
:
option
s
=
).
with
(
%w[path1 path2]
)
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