Permalink
Browse files

Only load_generators if we Rails is available

0.2.6 broke HEAD on Draper since it does not include Rails as a
dependency
  • Loading branch information...
1 parent fac439f commit a01d27762e58b8c1c42b728505c8b81b697d7562 @leshill leshill committed Jun 28, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/ammeter/init.rb
View
@@ -1,4 +1,6 @@
require 'ammeter/rspec/generator/example.rb'
require 'ammeter/rspec/generator/matchers.rb'
-Rails.application.load_generators
+if Rails.respond_to?(:application) && Rails.application.respond_to?(:load_generators)
+ Rails.application.load_generators
+end

0 comments on commit a01d277

Please sign in to comment.