Refactor tests in kernel.rb
Merge pull request #1759 from suzukaze/fix-test

Refactor tests in kernel.rb