Permalink
Browse files

Make Rails 3 load Machinist as the fixture_replacement

  • Loading branch information...
1 parent bc4872a commit 70129305a7b91ef83d0bb0aa6636839df457bc22 @indirect committed Aug 14, 2010
Showing with 6 additions and 1 deletion.
  1. +1 −1 lib/machinist.rb
  2. +5 −0 lib/machinist/railtie.rb
View
@@ -2,4 +2,4 @@
require 'machinist/exceptions'
require 'machinist/lathe'
require 'machinist/machinable'
-
+require 'machinist/railtie' if defined?(Rails::Railtie)
View
@@ -0,0 +1,5 @@
+module Machinist
+ class Railtie < ::Rails::Railtie
+ config.generators.fixture_replacement :machinist
+ end
+end

0 comments on commit 7012930

Please sign in to comment.