Permalink
Browse files

Fix problem with the newer version of Factory Girl

Thanks @GMFlash!

Closes #586
  • Loading branch information...
1 parent 23cd662 commit d639d5eaefc237d79199dd745c4257cdaefd4063 @sikachu sikachu committed Sep 4, 2011
Showing with 8 additions and 2 deletions.
  1. +8 −2 shoulda_macros/paperclip.rb
@@ -109,8 +109,14 @@ class ActionController::Integration::Session #:nodoc:
end
end
-class Factory
- include Paperclip::Shoulda #:nodoc:
+if defined?(FactoryGirl::Factory)
+ class FactoryGirl::Factory
+ include Paperclip::Shoulda #:nodoc:
+ end
+else
+ class Factory
+ include Paperclip::Shoulda #:nodoc:
+ end
end
class Test::Unit::TestCase #:nodoc:

0 comments on commit d639d5e

Please sign in to comment.