Commit 9512933b authored by Sean McGivern's avatar Sean McGivern

Fix Geo::LogCursor::Daemon spec

When run after ee/spec/features/dashboards/activity_spec.rb, this would
fail to find the correct constant with:

> NameError: uninitialized constant Events::RepositoryUpdatedEvent

I'm not sure why this was; we give `Object.const_get` a fully-qualified
constant, and it should look that up first before attempting the default
behaviour of finding constants in ancestor classes.

Alternatives:

- `Object.const_get("::#{current_namespace}...")` - didn't work.
- `"::#{current_namespace}...".constantize` - does work, but that is a
  bigger change as `#constantize` does much more work here.
parent c4b7e592
......@@ -85,7 +85,7 @@ module Gitlab
def event_klass_for(event)
event_klass_name = event.class.name.demodulize
current_namespace = self.class.name.deconstantize
Object.const_get("#{current_namespace}::Events::#{event_klass_name}")
Object.const_get("#{current_namespace}::Events::#{event_klass_name}", false)
end
def trap_signals
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment