Test factory only if it responds to valid?

Allow Factory Girl to be used for non-ActiveRecord objects:

    FactoryGirl.define do
      factory :bundle, class: Hash do
        initialize_with do
          { test: :fail }
        end
      end
    end