diff --git a/lib/dm-core/spec/shared/adapter_spec.rb b/lib/dm-core/spec/shared/adapter_spec.rb
index <HASH>..<HASH> 100644
--- a/lib/dm-core/spec/shared/adapter_spec.rb
+++ b/lib/dm-core/spec/shared/adapter_spec.rb
@@ -51,7 +51,7 @@ share_examples_for 'An Adapter' do
   end
 
   after :all do
-    Object.send(:remove_const,'Heffalump')
+    Object.send(:remove_const,'Heffalump') if defined? ::Heffalump
   end
 
   if adapter_supports?(:create)
Be more defensive when removing Heffalump const in shared adapter specs