Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
heptapod
Commits
4d15a69f1934
Unverified
Commit
0364e074
authored
Nov 02, 2017
by
Rémy Coutable
Browse files
Address Douwe's feedback
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
78933af5decc
Changes
3
Hide whitespace changes
Inline
Side-by-side
doc/development/testing_guide/best_practices.md
View file @
4d15a69f
...
...
@@ -72,7 +72,7 @@ To resume the test run, press any key.
For example:
```
ruby
```
$ bin/rspec spec/features/auto_deploy_spec.rb:34
Running via Spring preloader in process 8999
Run options: include {:locations=>{"./spec/features/auto_deploy_spec.rb"=>[34]}}
...
...
spec/support/live_debugger.rb
View file @
4d15a69f
...
...
@@ -2,9 +2,10 @@
module
LiveDebugger
def
live_debug
puts
"
\n
Current example is paused for live debugging."
puts
puts
"Current example is paused for live debugging."
puts
"Opening
#{
current_url
}
in your default browser..."
puts
"The current user credentials are:
#{
@current_user
.
username
}
/
12345678
"
if
@current_user
puts
"The current user credentials are:
#{
@current_user
.
username
}
/
#{
@current_user
.
password
}
"
if
@current_user
puts
"Press any key to resume the execution of the example!!"
`open
#{
current_url
}
`
...
...
spec/support/login_helpers.rb
View file @
4d15a69f
...
...
@@ -11,6 +11,13 @@ def sign_in(resource, scope: nil)
@current_user
=
resource
end
# Overriding Devise::Test::IntegrationHelpers#sign_out to clear @current_user.
def
sign_out
(
resource_or_scope
)
super
@current_user
=
nil
end
# Internal: Log in as a specific user or a new user of a specific role
#
# user_or_role - User object, or a role to create (e.g., :admin, :user)
...
...
@@ -49,6 +56,7 @@ def gitlab_sign_in_via(provider, user, uid)
def
gitlab_sign_out
find
(
".header-user-dropdown-toggle"
).
click
click_link
"Sign out"
@current_user
=
nil
expect
(
page
).
to
have_button
(
'Sign in'
)
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