spec/spec_helper.rb in instrumental_agent-0.8.3 vs spec/spec_helper.rb in instrumental_agent-0.9.0
- old
+ new
@@ -13,11 +13,13 @@
end
def parse_constant(constant)
- source, _, constant_name = constant.to_s.rpartition('::')
-
+ constant = constant.to_s
+ parts = constant.split("::")
+ constant_name = parts.pop
+ source = parts.join("::")
[source.constantize, constant_name]
end
def with_constants(constants, &block)
saved_constants = {}
\ No newline at end of file