Use more appropriate assertion methods
MODIFY
mrbgems/mruby-metaprog/test/metaprog.rb
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

MODIFY
test/t/bs_block.rb
test/t/bs_block.rb
@@ -408,6 +408,7 @@ assert('BS Block 32') do
end
assert('BS Block [ruby-core:14395]') do
+ assert_nothing_raised do
class Controller
def respond_to(&block)
responder = Responder.new
@@ -428,7 +429,6 @@ assert('BS Block [ruby-core:14395]') do
"in render"
end
end
-
class Responder
def method_missing(symbol, &block)
"enter method_missing"
@@ -443,7 +443,8 @@ assert('BS Block [ruby-core:14395]') do
end
end
t = Controller.new
- assert_true t.test_for_bug
+ t.test_for_bug
+ end
end
assert("BS Block 33") do

MODIFY
test/t/module.rb
test/t/module.rb
@@ -231,7 +231,7 @@ assert('Module#const_set', '15.2.2.4.23') do
Const4Test4ConstSet = 42
end
- assert_true Test4ConstSet.const_set(:Const4Test4ConstSet, 23)
+ assert_equal 23, Test4ConstSet.const_set(:Const4Test4ConstSet, 23)
assert_equal 23, Test4ConstSet.const_get(:Const4Test4ConstSet)
end

Use more appropriate assertion methods