summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-bin-mruby
diff options
context:
space:
mode:
authorKOBAYASHI Shuji <[email protected]>2019-07-30 12:46:24 +0900
committerKOBAYASHI Shuji <[email protected]>2019-07-30 13:05:01 +0900
commit44381f0a0c306a8c778f546926d3febfdf981b45 (patch)
tree4dab936e4d182906b3c32a3c810f09d1f4add693 /mrbgems/mruby-bin-mruby
parentff43b2b97c77812abbcbfe14da4582c6c209be9b (diff)
downloadmruby-44381f0a0c306a8c778f546926d3febfdf981b45.tar.gz
mruby-44381f0a0c306a8c778f546926d3febfdf981b45.zip
Refine message to `skip` in nested `assert`
- I think "Info" is used only to `skip`, so change to "Skip". - Changed the default value of `assert` and specify the argument explicitly at the caller of `assert` because it is unnatural "Assertion failed" is output even though the assertion doesn't fail. == Example: def assert_foo(exp, act) assert do assert_equal exp[0], act[0] assert_equal exp[1], act[1] end end def assert_bar(exp, act) assert do skip end end def assert_baz(exp, act) assert do assert_equal exp, act assert_bar exp, act end end assert 'test#skip_in_nested_assert' do assert_baz 1, 1 end === Before this patch: ?.. Info: test#skip_in_nested_assert (core) - Assertion[1] Info: Assertion failed (core) - Assertion[1-2] Skip: Assertion failed (core) Total: 3 OK: 2 KO: 0 Crash: 0 Warning: 0 Skip: 1 === After this patch: ??? Skip: test#skip_in_nested_assert (core) - Assertion[1] Skip: assert (core) - Assertion[1-2] Skip: assert (core) Total: 3 OK: 0 KO: 0 Crash: 0 Warning: 0 Skip: 3
Diffstat (limited to 'mrbgems/mruby-bin-mruby')
-rw-r--r--mrbgems/mruby-bin-mruby/bintest/mruby.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/mrbgems/mruby-bin-mruby/bintest/mruby.rb b/mrbgems/mruby-bin-mruby/bintest/mruby.rb
index 5dbbc5592..e032ff79a 100644
--- a/mrbgems/mruby-bin-mruby/bintest/mruby.rb
+++ b/mrbgems/mruby-bin-mruby/bintest/mruby.rb
@@ -3,7 +3,7 @@ require 'open3'
def assert_mruby(exp_out, exp_err, exp_success, args)
out, err, stat = Open3.capture3(cmd("mruby"), *args)
- assert do
+ assert "assert_mruby" do
assert_operator(exp_out, :===, out, "standard output")
assert_operator(exp_err, :===, err, "standard error")
assert_equal(exp_success, stat.success?, "exit success?")