fix rubocop and rspec issues [skip ci]