Refactor tests in kernel.rb

Wrong:
assert_equal actual, expected

Correct:
assert_equal expected, actual

and
Use assert_true, actual instead of assert_equal true, actual.
Use assert_false, actual instead of assert_equal false, actual.