extract expet_int_exception in cmd spec to calm rubocop