FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
github_cli/spec/github_cli/dsl_spec.rb at master · danieldeb/github_cli · GitHub
danieldeb
/
github_cli
Public
forked from
piotrmurach/github_cli
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
github_cli
/
spec
/
github_cli
/
dsl_spec.rb
Copy path
More file actions
More file actions
Latest commit
History
History
History
32 lines (25 loc) · 701 Bytes
Breadcrumbs
github_cli
/
spec
/
github_cli
/
dsl_spec.rb
Copy path
File metadata and controls
32 lines (25 loc) · 701 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# encoding: utf-8
require
'spec_helper'
describe
GithubCLI
,
'dsl'
do
let
(
:object
)
{
described_class
}
let
(
:error_cli
)
{
GithubCLI
::
GitHubError
}
before
{
GithubCLI
.
ui
.
stub
(
:error
)
GithubCLI
.
ui
.
stub
(
:debug
)
}
after
{
GithubCLI
.
ui
.
unstub
(
:error
)
GithubCLI
.
ui
.
unstub
(
:debug
)
}
context
'on_error'
do
it
"handles internal cli errors"
do
expect
{
object
.
on_error
{
raise
error_cli
}
}
.
to
exit_with_code
(
11
)
end
it
"handles interrupts"
do
expect
{
object
.
on_error
{
raise
Interrupt
}
}
.
to
exit_with_code
(
1
)
end
it
"handles fatal exceptions"
do
expect
{
object
.
on_error
{
raise
Exception
}
}
.
to
exit_with_code
(
1
)
end
end
end
Back
|
FazBrowse Home
|
New Git URL