lib/generators/templates/application/merb/spec/spec_helper.rb in merb-gen-0.9.6 vs lib/generators/templates/application/merb/spec/spec_helper.rb in merb-gen-0.9.7

- old
+ new

@@ -1,7 +1,14 @@ -require 'rubygems' -require 'merb-core' -require 'spec' # Satisfies Autotest and anyone else not using the Rake tasks +require "rubygems" + +# Add the local gems dir if found within the app root; any dependencies loaded +# hereafter will try to load from the local gems before loading system gems. +if (local_gem_dir = File.join(File.dirname(__FILE__), '..', 'gems')) && $BUNDLE.nil? + $BUNDLE = true; Gem.clear_paths; Gem.path.unshift(local_gem_dir) +end + +require "merb-core" +require "spec" # Satisfies Autotest and anyone else not using the Rake tasks # this loads all plugins required in your init file so don't add them # here again, Merb will do it for you Merb.start_environment(:testing => true, :adapter => 'runner', :environment => ENV['MERB_ENV'] || 'test')