lib/genspec/matchers/base.rb in genspec-0.3.0 vs lib/genspec/matchers/base.rb in genspec-0.3.1
- old
+ new
@@ -28,10 +28,10 @@
@init_blocks = generator[:init_blocks]
if @described.kind_of?(Class)
@generator = @described
else
- if defined?(Rails)
+ if GenSpec.rails?
@generator = Rails::Generators.find_by_namespace(@described, base)
else
@generator = Thor::Util.find_by_namespace(@described)
end
end