fix to clear undefined method controller from https://github.com/rspec/rspec-core/issues/1540