Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mruby
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
mruby
Commits
d1cdb9ef
Unverified
Commit
d1cdb9ef
authored
Mar 03, 2019
by
Yukihiro "Matz" Matsumoto
Committed by
GitHub
Mar 03, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4311 from shuujii/simplify-MRubyTestSkip-in-test-assert.rb
Simplify `MRubyTestSkip` in `test/assert.rb`
parents
83a1df37
c6b81069
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
11 deletions
+3
-11
test/assert.rb
test/assert.rb
+3
-11
No files found.
test/assert.rb
View file @
d1cdb9ef
...
...
@@ -19,11 +19,8 @@ end
# Create the assertion in a readable way
def
assertion_string
(
err
,
str
,
iso
=
nil
,
e
=
nil
,
bt
=
nil
)
msg
=
"
#{
err
}#{
str
}
"
msg
+=
" [
#{
iso
}
]"
if
iso
&&
iso
!=
''
if
e
m
=
e
.
respond_to?
(
:cause
)
?
e
.
cause
:
e
.
message
msg
+=
" =>
#{
m
}
"
if
m
&&
!
m
.
empty?
end
msg
+=
" [
#{
iso
}
]"
if
iso
&&
!
iso
.
empty?
msg
+=
" =>
#{
e
}
"
if
e
&&
!
e
.
to_s
.
empty?
msg
+=
" (
#{
GEMNAME
==
'mruby-test'
?
'core'
:
"mrbgems:
#{
GEMNAME
}
"
}
)"
if
$mrbtest_assert
&&
$mrbtest_assert
.
size
>
0
$mrbtest_assert
.
each
do
|
idx
,
assert_msg
,
diff
|
...
...
@@ -258,12 +255,7 @@ end
##
# Skip the test
class
MRubyTestSkip
<
NotImplementedError
attr_accessor
:cause
def
initialize
(
cause
)
@cause
=
cause
end
end
class
MRubyTestSkip
<
NotImplementedError
;
end
def
skip
(
cause
=
""
)
raise
MRubyTestSkip
.
new
(
cause
)
...
...
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