Fix a rubocop complaint and mock nodes