summaryrefslogtreecommitdiffhomepage
path: root/mrbgems
diff options
context:
space:
mode:
authorKOBAYASHI Shuji <[email protected]>2019-02-19 20:02:50 +0900
committerKOBAYASHI Shuji <[email protected]>2019-02-19 20:02:50 +0900
commit8a7298e069023b634c2011c4727d12f9fea725c2 (patch)
treef31aea66abd07e4f248638cd1be626679fbd348e /mrbgems
parent971bfd13c152bb9ac8f09737b89a228c88e15d66 (diff)
downloadmruby-8a7298e069023b634c2011c4727d12f9fea725c2.tar.gz
mruby-8a7298e069023b634c2011c4727d12f9fea725c2.zip
Use more appropriate assertion methods
Diffstat (limited to 'mrbgems')
-rw-r--r--mrbgems/mruby-metaprog/test/metaprog.rb11
1 files changed, 6 insertions, 5 deletions
diff --git a/mrbgems/mruby-metaprog/test/metaprog.rb b/mrbgems/mruby-metaprog/test/metaprog.rb
index 748fe9c6c..8bc3719b8 100644
--- a/mrbgems/mruby-metaprog/test/metaprog.rb
+++ b/mrbgems/mruby-metaprog/test/metaprog.rb
@@ -143,8 +143,8 @@ assert('Module#class_variable_set', '15.2.2.4.18') do
end
end
- assert_true Test4ClassVariableSet.class_variable_set(:@@cv, 99)
- assert_true Test4ClassVariableSet.class_variable_set(:@@foo, 101)
+ assert_equal 99, Test4ClassVariableSet.class_variable_set(:@@cv, 99)
+ assert_equal 101, Test4ClassVariableSet.class_variable_set(:@@foo, 101)
assert_true Test4ClassVariableSet.class_variables.include? :@@cv
assert_equal 99, Test4ClassVariableSet.class_variable_get(:@@cv)
assert_equal 101, Test4ClassVariableSet.new.foo
@@ -238,9 +238,10 @@ assert('Module#remove_method', '15.2.2.4.41') do
end
end
- assert_true Test4RemoveMethod::Child.class_eval{ remove_method :hello }
- assert_true Test4RemoveMethod::Child.instance_methods.include? :hello
- assert_false Test4RemoveMethod::Child.instance_methods(false).include? :hello
+ klass = Test4RemoveMethod::Child
+ assert_same klass, klass.class_eval{ remove_method :hello }
+ assert_true klass.instance_methods.include? :hello
+ assert_false klass.instance_methods(false).include? :hello
end
assert('Module.nesting', '15.2.2.2.2') do