diff --git a/lib/pickle/adapter.rb b/lib/pickle/adapter.rb
index <HASH>..<HASH> 100644
--- a/lib/pickle/adapter.rb
+++ b/lib/pickle/adapter.rb
@@ -106,15 +106,29 @@ module Pickle
     # factory-girl adapter
     class FactoryGirl < Adapter
       def self.factories
-        (::Factory.factories.values rescue []).map {|factory| new(factory)}
+        if defined? ::FactoryGirl
+          factories = []
+          ::FactoryGirl.factories.each {|v| factories << new(v)}
+          factories
+        else
+          (::Factory.factories.values rescue []).map {|factory| new(factory)}
+        end
       end
 
       def initialize(factory)
-        @klass, @name = factory.build_class, factory.factory_name.to_s
+        if defined? ::FactoryGirl
+          @klass, @name = factory.build_class, factory.name.to_s
+        else
+          @klass, @name = factory.build_class, factory.factory_name.to_s
+        end
       end
 
       def create(attrs = {})
-        Factory(@name, attrs)
+        if defined? ::FactoryGirl
+          ::FactoryGirl.create(@name, attrs)
+        else
+          Factory(@name, attrs)
+        end
       end
     end
FactoryGirl <I> API is quite different.  Adjust adapter to use correct behavior depending on whether new FactoryGirl API is present.